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:
parent
378544f326
commit
d757993432
@ -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 });
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user