|
|
@ -101,11 +101,20 @@ app
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
const port = Number(process.env.PORT) || 3000;
|
|
|
|
const port = Number(process.env.PORT) || 3000;
|
|
|
|
server.listen(port, () => {
|
|
|
|
const host = process.env.HOST;
|
|
|
|
logger.info(`Server ready on port ${port}`, {
|
|
|
|
if (host) {
|
|
|
|
label: 'Server',
|
|
|
|
server.listen(port, host, () => {
|
|
|
|
|
|
|
|
logger.info(`Server ready on ${host} port ${port}`, {
|
|
|
|
|
|
|
|
label: 'Server',
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
|
|
|
|
server.listen(port, () => {
|
|
|
|
|
|
|
|
logger.info(`Server ready on port ${port}`, {
|
|
|
|
|
|
|
|
label: 'Server',
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch((err) => {
|
|
|
|
.catch((err) => {
|
|
|
|
logger.error(err.stack);
|
|
|
|
logger.error(err.stack);
|
|
|
|