From 51a22eca86912e167e9f0f5233c4540e4c82c751 Mon Sep 17 00:00:00 2001 From: Trivernis Date: Sat, 11 May 2019 14:28:29 +0200 Subject: [PATCH] Hotfix settings not defined - added preinitialized settings to bin/www --- bin/www | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/www b/bin/www index 49c2891..7f43cbf 100644 --- a/bin/www +++ b/bin/www @@ -10,8 +10,10 @@ const http = require('http'); const yaml = require('js-yaml'); const fsx = require('fs-extra'); +let settings = {}; + try { - let settings = yaml.safeLoad(fsx.readFileSync('default-config.yaml')); + settings = yaml.safeLoad(fsx.readFileSync('default-config.yaml')); if (fsx.existsSync('config.yaml')) Object.assign(settings, yaml.safeLoad(fsx.readFileSync('config.yaml')));