support status and health check on web and web-api

This commit is contained in:
Brian Gough 2017-06-19 15:54:14 +01:00
parent 02cb0f2295
commit d32a3fbaf5

View file

@ -267,13 +267,18 @@ module.exports = class Router
apiRouter.get '/perfTest', (req,res)-> apiRouter.get '/perfTest', (req,res)->
res.send("hello") res.send("hello")
apiRouter.get '/status', (req,res)-> webRouter.get '/status', (req,res)->
res.send("websharelatex is up") res.send("websharelatex is up")
apiRouter.get '/status', (req,res)->
res.send("websharelatex api is up")
webRouter.get '/dev/csrf', (req, res) -> webRouter.get '/dev/csrf', (req, res) ->
res.send res.locals.csrfToken res.send res.locals.csrfToken
webRouter.get '/health_check', HealthCheckController.check
apiRouter.get '/health_check', HealthCheckController.check apiRouter.get '/health_check', HealthCheckController.check
webRouter.get '/health_check/redis', HealthCheckController.checkRedis
apiRouter.get '/health_check/redis', HealthCheckController.checkRedis apiRouter.get '/health_check/redis', HealthCheckController.checkRedis
webRouter.get "/status/compiler/:Project_id", AuthorizationMiddlewear.ensureUserCanReadProject, (req, res) -> webRouter.get "/status/compiler/:Project_id", AuthorizationMiddlewear.ensureUserCanReadProject, (req, res) ->