db-rest/index.js

14 lines
249 B
JavaScript
Raw 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 {
logger.info(`Listening on ${config.hostname}:${config.port}.`)
2017-10-23 23:13:53 +02:00
}
})