Browse Source

stack can now load from stored config

master
Lloyd Brookes 9 years ago
parent
commit
ac8994032c
  1. 7
      lib/local-web-server.js

7
lib/local-web-server.js

@ -21,9 +21,12 @@ class LocalWebServer {
const commandLineArgs = require('command-line-args')
const commandLineUsage = require('command-line-usage')
const cli = require('../lib/cli-data')
const loadConfig = require('config-master')
const stored = loadConfig('local-web-server')
/* manually scan for any --stack passed, as we may need to display stack options */
const stackPaths = initOptions.stack || []
const stackPaths = initOptions.stack || stored.stack || []
const stackIndex = process.argv.indexOf('--stack')
if (stackIndex > -1) {
for (var i = stackIndex + 1; i < process.argv.length; i++) {
@ -89,8 +92,6 @@ class LocalWebServer {
}
/* combine in stored config */
const loadConfig = require('config-master')
const stored = loadConfig('local-web-server')
options = Object.assign({ port: 8000 }, initOptions, stored, options.server, options.middleware, options.misc)
this.options = options

Loading…
Cancel
Save