mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
use object.assign and pass along options
This commit is contained in:
parent
efe66c3ff9
commit
94fdbdb58b
@ -15,17 +15,10 @@ function createApp (options) {
|
|||||||
const stores = createStores(options);
|
const stores = createStores(options);
|
||||||
const eventBus = new EventEmitter();
|
const eventBus = new EventEmitter();
|
||||||
|
|
||||||
const config = {
|
const config = Object.assign({
|
||||||
baseUriPath: options.baseUriPath,
|
|
||||||
serverMetrics: options.serverMetrics,
|
|
||||||
enableRequestLogger: options.enableRequestLogger,
|
|
||||||
port: options.port,
|
|
||||||
publicFolder: options.publicFolder,
|
|
||||||
preRouterHook: options.preRouterHook,
|
|
||||||
preHook: options.preHook,
|
|
||||||
stores,
|
stores,
|
||||||
eventBus,
|
eventBus,
|
||||||
};
|
}, options);
|
||||||
|
|
||||||
const app = getApp(config);
|
const app = getApp(config);
|
||||||
const server = app.listen(app.get('port'), () => {
|
const server = app.listen(app.get('port'), () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user