From 31193e95870e329b3bb2abfa3f6ce9c4e4022139 Mon Sep 17 00:00:00 2001 From: ivaosthu Date: Fri, 2 Dec 2016 17:21:54 +0100 Subject: [PATCH] only one level of creating options --- bin/unleash.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/unleash.js b/bin/unleash.js index 3935e1ba9b..e8034743e5 100755 --- a/bin/unleash.js +++ b/bin/unleash.js @@ -4,7 +4,6 @@ process.env.NODE_ENV = 'production'; const program = require('commander'); -const { createOptions } = require('../lib/options.js'); const serverImpl = require('../lib/server-impl.js'); program @@ -13,14 +12,16 @@ program .parse(process.argv); const userOpts = {}; + if(program.databaseUri) { userOpts.databaseUri = program.databaseUri; } + if(program.port) { userOpts.port = program.port; } -serverImpl.start(createOptions(userOpts)) +serverImpl.start(userOpts) .then(conf => console.log(`Unleash started on http://localhost:${conf.app.get('port')}`)) .catch(console.err);