Skip to content

Commit d3bd586

Browse files
Merge pull request #2409 from adaptlearning/issue/2005
Pass command line arguments to server script
2 parents 08cef6f + 4a7f465 commit d3bd586

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

lib/application.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -328,14 +328,13 @@ Origin.prototype.createServer = function (options, cb) {
328328

329329
Origin.prototype.startServer = function (options) {
330330
var app = this;
331-
// Ensure that the options object is set.
332-
if(typeof options === 'undefined') {
333-
options = {
334-
skipDependencyCheck: false,
335-
skipVersionCheck: false,
336-
skipStartLog: false
337-
};
338-
}
331+
332+
options = { ...{
333+
skipDependencyCheck: false,
334+
skipVersionCheck: false,
335+
skipStartLog: false
336+
}, ...options };
337+
339338
checkPrerequisites(options, function(err, result) {
340339
if(err) {
341340
logger.log('error', chalk.red(err.message));

server.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
2-
var app = require('./lib/application')();
3-
app.run();
1+
const app = require('./lib/application')();
2+
const argv = require('optimist').argv;
3+
4+
app.run(argv);

0 commit comments

Comments
 (0)