nfp_sites/base/static_routes.mjs
Jonatan Nilsson 6565409e52 base: Added /health route.
nfp_moe: Complete re-thinking of all loading. Smarter loading and lighter site. Better user experience among other things.
2022-08-21 21:54:24 +00:00

17 lines
303 B
JavaScript

import config from './config.mjs'
export default class StaticRoutes {
constructor(opts = {}) {
Object.assign(this, { })
}
register(server) {
server.flaska.get('/health', this.health.bind(this))
}
health(ctx) {
ctx.body = {
environment: config.get('NODE_ENV'),
}
}
}