1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +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 54073a8293
commit 7247176ee0

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, () => {
const server = app.listen(
{ port: options.port, host: options.host },
() => {
logger.info(`Unleash started on port ${server.address().port}`);
resolve({ app, server, eventBus });
});
}
);
});
}