File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 1+ package handlers
2+
3+ import (
4+ "net/http"
5+
6+ "github.com/gin-gonic/gin"
7+ )
8+
9+ // HealthHandler is the handler for /health route.
10+ // It states if server is in healthy state or not
11+ func HealthHandler () gin.HandlerFunc {
12+ return func (c * gin.Context ) {
13+ c .String (http .StatusOK , "OK" )
14+ }
15+ }
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ func InitRouter() *gin.Engine {
1414 router .Use (middlewares .CORSMiddleware ())
1515
1616 router .GET ("/" , handlers .RootHandler ())
17+ router .GET ("/health" , handlers .HealthHandler ())
1718 router .POST ("/graphql" , handlers .GraphqlHandler ())
1819 router .GET ("/playground" , handlers .PlaygroundHandler ())
1920 router .GET ("/oauth_login/:oauth_provider" , handlers .OAuthLoginHandler ())
You can’t perform that action at this time.
0 commit comments