From 221ed4b98011e63a7d37eaf1f5186b10a2bc2e71 Mon Sep 17 00:00:00 2001 From: Mattias Erming Date: Sat, 13 Sep 2014 09:41:11 -0700 Subject: [PATCH] Change config.json to config.js --- config.js | 8 ++++++++ config.json | 7 ------- src/client.js | 2 +- src/command-line/config.js | 2 +- src/command-line/start.js | 2 +- src/helper.js | 2 +- src/plugins/irc-events/image.js | 2 +- src/server.js | 2 +- 8 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 config.js delete mode 100644 config.json diff --git a/config.js b/config.js new file mode 100644 index 00000000..5f486c2c --- /dev/null +++ b/config.js @@ -0,0 +1,8 @@ +module.exports = { + public: true, + host: "0.0.0.0", + port: 9090, + theme: "themes/example.css", + home: "", + debug: false +}; diff --git a/config.json b/config.json deleted file mode 100644 index 0719e85c..00000000 --- a/config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "debug": false, - "host": "0.0.0.0", - "port": 9000, - "theme": "themes/example.css", - "public": true -} diff --git a/src/client.js b/src/client.js index faacbc33..7734fc26 100644 --- a/src/client.js +++ b/src/client.js @@ -1,5 +1,5 @@ var _ = require("lodash"); -var config = require("../config.json"); +var config = require("../config"); var net = require("net"); var Msg = require("./models/msg"); var Network = require("./models/network"); diff --git a/src/command-line/config.js b/src/command-line/config.js index f9425467..32e54426 100644 --- a/src/command-line/config.js +++ b/src/command-line/config.js @@ -1,7 +1,7 @@ var program = require("commander"); var child = require("child_process"); -var CONFIG_PATH = process.cwd() + "/config.json"; +var CONFIG_PATH = process.cwd() + "/config.js"; program .command("config") diff --git a/src/command-line/start.js b/src/command-line/start.js index ee25d630..be9bf03a 100644 --- a/src/command-line/start.js +++ b/src/command-line/start.js @@ -1,4 +1,4 @@ -var config = require("../../config.json"); +var config = require("../../config"); var ClientManager = new require("../clientManager"); var program = require("commander"); var shout = require("../server"); diff --git a/src/helper.js b/src/helper.js index 093c78b8..85e1603d 100644 --- a/src/helper.js +++ b/src/helper.js @@ -2,7 +2,7 @@ var path = require("path"); var Helper = module.exports = { getConfig: function () { - return require(path.resolve(__dirname, "..", "config.json")); + return require(path.resolve(__dirname, "..", "config")); }, getHomeDirectory: function () { diff --git a/src/plugins/irc-events/image.js b/src/plugins/irc-events/image.js index c57d7cb7..d633c2dc 100644 --- a/src/plugins/irc-events/image.js +++ b/src/plugins/irc-events/image.js @@ -1,6 +1,6 @@ var _ = require("lodash"); var Msg = require("../../models/msg"); -var config = require("../../../config.json"); +var config = require("../../../config"); var fs = require("fs"); var mkdirp = require("mkdirp"); var request = require("superagent"); diff --git a/src/server.js b/src/server.js index 6efccf30..d568a5fc 100644 --- a/src/server.js +++ b/src/server.js @@ -2,7 +2,7 @@ var _ = require("lodash"); var bcrypt = require("bcrypt"); var Client = require("./client"); var ClientManager = require("./clientManager"); -var config = require("../config.json"); +var config = require("../config"); var fs = require("fs"); var http = require("connect"); var io = require("socket.io");