2021-07-03 13:56:53 +00:00
|
|
|
import config from '../config.mjs'
|
2017-12-09 21:51:18 +00:00
|
|
|
|
2021-10-11 00:21:57 +00:00
|
|
|
export default class TestRoutes {
|
|
|
|
constructor(opts = {}) {
|
|
|
|
Object.assign(this, { })
|
|
|
|
}
|
|
|
|
|
|
|
|
static(ctx) {
|
|
|
|
ctx.body = {
|
|
|
|
name: config.get('name'),
|
|
|
|
version: config.get('version'),
|
|
|
|
environment: config.get('NODE_ENV'),
|
|
|
|
}
|
2017-12-09 21:51:18 +00:00
|
|
|
}
|
2021-07-03 13:56:53 +00:00
|
|
|
|
2021-10-11 00:21:57 +00:00
|
|
|
error(ctx) {
|
|
|
|
throw new Error('This is a test')
|
|
|
|
}
|
2021-07-03 13:56:53 +00:00
|
|
|
}
|