11 lines
235 B
JavaScript
11 lines
235 B
JavaScript
import {api, config} from './api.js'
|
|
|
|
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}).`)
|
|
}
|
|
})
|