1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

Use options object with server.listen

This commit is contained in:
Ivar Conradi Østhus 2018-05-06 12:21:11 +02:00
parent 378544f326
commit d757993432

View File

@ -29,10 +29,13 @@ function createApp(options) {
startMonitoring(options.serverMetrics, eventBus);
return new Promise(resolve => {
const server = app.listen(app.get('port'), options.host, () => {
logger.info(`Unleash started on port ${server.address().port}`);
resolve({ app, server, eventBus });
});
const server = app.listen(
{ port: options.port, host: options.host },
() => {
logger.info(`Unleash started on port ${server.address().port}`);
resolve({ app, server, eventBus });
}
);
});
}