Skip to content

Instantly share code, notes, and snippets.

@Depado

Depado/block1.go Secret

Created July 3, 2018 10:00
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 Depado/aafc3273873fb28f731b9a7f032f36aa to your computer and use it in GitHub Desktop.
Save Depado/aafc3273873fb28f731b9a7f032f36aa to your computer and use it in GitHub Desktop.
package main
import (
"net/http"
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
)
func main() {
r := gin.Default()
r.GET("/health", func(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"alive": true})
})
if err := r.Run("127.0.0.1:8080"); err != nil {
logrus.WithError(err).Fatal("Couldn't listen")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment