fix: resolves #115
This commit is contained in:
parent
c09ca3b810
commit
260f533b41
15
server/handlers/health.go
Normal file
15
server/handlers/health.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package handlers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// HealthHandler is the handler for /health route.
|
||||
// It states if server is in healthy state or not
|
||||
func HealthHandler() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
c.String(http.StatusOK, "OK")
|
||||
}
|
||||
}
|
|
@ -14,6 +14,7 @@ func InitRouter() *gin.Engine {
|
|||
router.Use(middlewares.CORSMiddleware())
|
||||
|
||||
router.GET("/", handlers.RootHandler())
|
||||
router.GET("/health", handlers.HealthHandler())
|
||||
router.POST("/graphql", handlers.GraphqlHandler())
|
||||
router.GET("/playground", handlers.PlaygroundHandler())
|
||||
router.GET("/oauth_login/:oauth_provider", handlers.OAuthLoginHandler())
|
||||
|
|
Loading…
Reference in New Issue
Block a user