Change config.json to config.js

This commit is contained in:
Mattias Erming 2014-09-13 09:41:11 -07:00
parent ead12493ff
commit 221ed4b980
8 changed files with 14 additions and 13 deletions

8
config.js Normal file
View file

@ -0,0 +1,8 @@
module.exports = {
public: true,
host: "0.0.0.0",
port: 9090,
theme: "themes/example.css",
home: "",
debug: false
};

View file

@ -1,7 +0,0 @@
{
"debug": false,
"host": "0.0.0.0",
"port": 9000,
"theme": "themes/example.css",
"public": true
}

View file

@ -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");

View file

@ -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")

View file

@ -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");

View file

@ -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 () {

View file

@ -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");

View file

@ -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");