diff --git a/lib/server-impl.js b/lib/server-impl.js index 20e8f3f8ea..9b1a1d80ca 100644 --- a/lib/server-impl.js +++ b/lib/server-impl.js @@ -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 }); + } + ); }); }