mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-21 15:48:05 +00:00
Add healthcheck endpoint for frontend & backend. (#388)
This commit is contained in:
parent
c6cadf7f03
commit
11d6186fe6
@ -24,4 +24,8 @@ public class Application extends Controller {
|
|||||||
return ok("TEST");
|
return ok("TEST");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Result healthcheck() {
|
||||||
|
return ok("GOOD");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
# Home page
|
# Home page
|
||||||
GET / controllers.Application.index()
|
GET / controllers.Application.index()
|
||||||
|
|
||||||
|
# Health check endpoint
|
||||||
|
GET /admin controllers.Application.healthcheck()
|
||||||
|
|
||||||
# Map static resources from the /public folder to the /assets URL path
|
# Map static resources from the /public folder to the /assets URL path
|
||||||
GET /assets/*file controllers.Assets.at(path="/public", file)
|
GET /assets/*file controllers.Assets.at(path="/public", file)
|
||||||
|
|
||||||
|
@ -50,6 +50,11 @@ public class Application extends Controller
|
|||||||
return ok(index.render());
|
return ok(index.render());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Result healthcheck()
|
||||||
|
{
|
||||||
|
return ok("GOOD");
|
||||||
|
}
|
||||||
|
|
||||||
@Security.Authenticated(Secured.class)
|
@Security.Authenticated(Secured.class)
|
||||||
public static Result index()
|
public static Result index()
|
||||||
{
|
{
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
# serveAsset action requires a path string
|
# serveAsset action requires a path string
|
||||||
GET / controllers.Application.serveAsset(path="index.html")
|
GET / controllers.Application.serveAsset(path="index.html")
|
||||||
|
|
||||||
|
GET /admin controllers.Application.healthcheck()
|
||||||
|
|
||||||
GET /login controllers.Application.login()
|
GET /login controllers.Application.login()
|
||||||
|
|
||||||
GET /logout controllers.Application.logout()
|
GET /logout controllers.Application.logout()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user