1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

use object.assign and pass along options

This commit is contained in:
sveisvei 2017-06-06 10:17:15 +02:00 committed by Ivar Conradi Østhus
parent fa6c28de8f
commit 6e4a22bf54

View File

@ -15,17 +15,10 @@ function createApp (options) {
const stores = createStores(options);
const eventBus = new EventEmitter();
const config = {
baseUriPath: options.baseUriPath,
serverMetrics: options.serverMetrics,
enableRequestLogger: options.enableRequestLogger,
port: options.port,
publicFolder: options.publicFolder,
preRouterHook: options.preRouterHook,
preHook: options.preHook,
const config = Object.assign({
stores,
eventBus,
};
}, options);
const app = getApp(config);
const server = app.listen(app.get('port'), () => {