You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
346 B
24 lines
346 B
4 years ago
|
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 {
|
||
|
"health": true,
|
||
|
})
|
||
|
})
|
||
|
|
||
|
if err := r.Run(":8080"); err != nil {
|
||
|
logrus.WithError(err).Fatal("Couldn't listen")
|
||
|
}
|
||
|
|
||
|
}
|