nfp_sites/base/static_routes.mjs
2022-10-29 12:03:30 +00:00

17 lines
307 B
JavaScript

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