Skip to content

Instantly share code, notes, and snippets.

@omarkurt
Created June 17, 2018 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omarkurt/8b5e3e7fa19aabf073d1b25df7c537be to your computer and use it in GitHub Desktop.
Save omarkurt/8b5e3e7fa19aabf073d1b25df7c537be to your computer and use it in GitHub Desktop.
package main
import "github.com/gin-gonic/gin"
func main() {
r := gin.Default()
r.GET("/ping", func(c *gin.Context) {
c.JSON(200, gin.H{
"message": "pong",
})
})
r.Run() // listen and serve on 0.0.0.0:8080
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment