Skip to content

Instantly share code, notes, and snippets.

@cheikhsimsol
Created February 14, 2024 05:37
Show Gist options
  • Save cheikhsimsol/b5279b5bc5f55751106e5939f4e4da6b to your computer and use it in GitHub Desktop.
Save cheikhsimsol/b5279b5bc5f55751106e5939f4e4da6b to your computer and use it in GitHub Desktop.
package main
import (
"net/http"
"github.com/gin-gonic/gin"
)
func launchSecondServer() {
router := gin.Default()
router.Use(func(ctx *gin.Context) {
ctx.JSON(
http.StatusOK,
gin.H{
"Message": "Ok!",
"Path": ctx.Request.URL.String(),
},
)
})
router.Run(":8081")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment