db-rest/index.js
2020-05-01 20:13:45 +02:00

13 lines
249 B
JavaScript

'use strict'
const {api, config} = require('./api')
api.listen(config.port, (err) => {
const {logger} = api.locals
if (err) {
logger.error(err)
process.exit(1)
} else {
logger.info(`Listening on ${config.hostname}:${config.port}.`)
}
})