13 lines
251 B
JavaScript
13 lines
251 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.port} (${config.hostname}).`)
|
|
}
|
|
})
|