This commit is contained in:
Rory Powell 2022-03-24 14:24:56 +00:00
parent 4856cdd819
commit 89db1b9cba
1 changed files with 3 additions and 4 deletions

View File

@ -13,6 +13,9 @@ const env = require("../environment")
const router = new Router()
router.get("/health", ctx => (ctx.status = 200))
router.get("/version", ctx => (ctx.body = pkg.version))
router
.use(
compress({
@ -33,8 +36,6 @@ router
}
await next()
})
.use("/health", ctx => (ctx.status = 200))
.use("/version", ctx => (ctx.body = pkg.version))
// re-direct before any middlewares occur
.redirect("/", "/builder")
.use(
@ -71,8 +72,6 @@ router.use(async (ctx, next) => {
}
})
router.get("/health", ctx => (ctx.status = 200))
// authenticated routes
for (let route of mainRoutes) {
router.use(route.routes())