Created
February 14, 2024 05:37
-
-
Save cheikhsimsol/b5279b5bc5f55751106e5939f4e4da6b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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