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:
parent
54073a8293
commit
7247176ee0
@ -29,10 +29,13 @@ function createApp(options) {
|
|||||||
startMonitoring(options.serverMetrics, eventBus);
|
startMonitoring(options.serverMetrics, eventBus);
|
||||||
|
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
const server = app.listen(app.get('port'), options.host, () => {
|
const server = app.listen(
|
||||||
logger.info(`Unleash started on port ${server.address().port}`);
|
{ port: options.port, host: options.host },
|
||||||
resolve({ app, server, eventBus });
|
() => {
|
||||||
});
|
logger.info(`Unleash started on port ${server.address().port}`);
|
||||||
|
resolve({ app, server, eventBus });
|
||||||
|
}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user