db-rest/index.js

14 lines
251 B
JavaScript
Raw Permalink Normal View History

2017-10-23 23:13:53 +02:00
'use strict'
2020-05-01 20:12:24 +02:00
const {api, config} = require('./api')
2017-12-16 09:06:35 +01:00
api.listen(config.port, (err) => {
const {logger} = api.locals
2017-10-23 23:13:53 +02:00
if (err) {
logger.error(err)
process.exit(1)
2017-10-23 23:13:53 +02:00
} else {
2022-11-22 16:07:33 +01:00
logger.info(`listening on ${config.port} (${config.hostname}).`)
2017-10-23 23:13:53 +02:00
}
})