From 6e4a22bf54dd0a0c0637a1ad263819de670cbd6e Mon Sep 17 00:00:00 2001 From: sveisvei Date: Tue, 6 Jun 2017 10:17:15 +0200 Subject: [PATCH] use object.assign and pass along options --- lib/server-impl.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/server-impl.js b/lib/server-impl.js index df4dd0a2cb..b251461fbc 100644 --- a/lib/server-impl.js +++ b/lib/server-impl.js @@ -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'), () => {