Hotfix settings not defined

- added preinitialized settings to bin/www
pull/3/head
Trivernis 6 years ago
parent c98c57cfa2
commit 51a22eca86

@ -10,8 +10,10 @@ const http = require('http');
const yaml = require('js-yaml'); const yaml = require('js-yaml');
const fsx = require('fs-extra'); const fsx = require('fs-extra');
let settings = {};
try { try {
let settings = yaml.safeLoad(fsx.readFileSync('default-config.yaml')); settings = yaml.safeLoad(fsx.readFileSync('default-config.yaml'));
if (fsx.existsSync('config.yaml')) if (fsx.existsSync('config.yaml'))
Object.assign(settings, yaml.safeLoad(fsx.readFileSync('config.yaml'))); Object.assign(settings, yaml.safeLoad(fsx.readFileSync('config.yaml')));

Loading…
Cancel
Save