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:
parent
fa6c28de8f
commit
6e4a22bf54
@ -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'), () => {
|
||||
|
Loading…
Reference in New Issue
Block a user