diff options
author | Arcensoth <arcensoth@gmail.com> | 2018-02-23 16:18:13 -0500 |
---|---|---|
committer | Arcensoth <arcensoth@gmail.com> | 2018-02-23 16:18:13 -0500 |
commit | e865b399823174cc73ea480c661994a3ea3e736b (patch) | |
tree | 6d303f1e0c7600fa742193e612ee2acd246088e7 | |
parent | Ignore node installation files (diff) | |
download | shulker-e865b399823174cc73ea480c661994a3ea3e736b.tar.gz shulker-e865b399823174cc73ea480c661994a3ea3e736b.zip |
Allow config file to be passed as a parameter
Diffstat (limited to '')
-rw-r--r-- | index.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/index.js b/index.js index 9f22887..0d5aed4 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,13 @@ var Rcon = require("./lib/rcon.js"); var express = require("express"); var app = express(); var http = require("http").Server(app); -var c = require("./config.json"); + +var cfile = (process.argv.length > 2) ? process.argv[2] : "./config.json" + +console.log("[INFO] Using configuration file:", cfile); + +var c = require(cfile); + var debug = c.DEBUG; var shulker = new Discord.Client(); |