aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/scripts/configure.js
diff options
context:
space:
mode:
authormarzavec <admin@marzavec.com>2018-03-10 08:47:00 +0100
committermarzavec <admin@marzavec.com>2018-03-10 08:47:00 +0100
commitfde6895720a4f417283b9e375583967b504de2f3 (patch)
treef5c8d9a188572d759456831d574bef9881d5c0be /server/src/scripts/configure.js
downloadhackchat-fde6895720a4f417283b9e375583967b504de2f3.tar.gz
hackchat-fde6895720a4f417283b9e375583967b504de2f3.zip
initial commit
Diffstat (limited to 'server/src/scripts/configure.js')
-rw-r--r--server/src/scripts/configure.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/server/src/scripts/configure.js b/server/src/scripts/configure.js
new file mode 100644
index 0000000..0ecd858
--- /dev/null
+++ b/server/src/scripts/configure.js
@@ -0,0 +1,23 @@
+/**
+ * Server configuration script, used reconfiguring server options
+ *
+ * Version: v2.0.0
+ * Developer: Marzavec ( https://github.com/marzavec )
+ * License: WTFPL ( http://www.wtfpl.net/txt/copying/ )
+ *
+ */
+
+'use strict';
+
+// import required classes
+const path = require('path');
+const ImportsManager = require('../managers/imports-manager');
+const ConfigManager = require('../managers/config');
+
+// import and initialize configManager & dependencies
+const importManager = new ImportsManager(null, path.join(__dirname, '../..'));
+importManager.init();
+const configManager = new ConfigManager(null, path.join(__dirname, '../..'), importManager);
+
+// execute config load with `reconfiguring` flag set to true
+configManager.load(true);