2022-08-21 21:54:24 +00:00
|
|
|
import config from './config.mjs'
|
|
|
|
|
|
|
|
export default class StaticRoutes {
|
|
|
|
constructor(opts = {}) {
|
|
|
|
Object.assign(this, { })
|
|
|
|
}
|
|
|
|
|
|
|
|
register(server) {
|
2022-10-29 12:03:30 +00:00
|
|
|
server.flaska.get('/api/health', this.health.bind(this))
|
2022-08-21 21:54:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
health(ctx) {
|
|
|
|
ctx.body = {
|
|
|
|
environment: config.get('NODE_ENV'),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|