From a279fb70d36584999ba184fd587d7250f655fa77 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Sun, 28 Jul 2013 09:06:16 +0300 Subject: [PATCH] Moving configuration files to config directory --- config.coffee | 10 ++++++++-- config/config.json | 16 ++++++++++++++++ parameters.json => config/parameters.json | 0 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 config/config.json rename parameters.json => config/parameters.json (100%) diff --git a/config.coffee b/config.coffee index c7588e6..9c1a37c 100644 --- a/config.coffee +++ b/config.coffee @@ -19,9 +19,15 @@ exports.LOG_INFORMS = false exports.DEBUG_DEVICES = {} # {'202BC1-BM632w-8KA8WA1151100043' : true} exports.DEVICE_ONLINE_THRESHOLD = 4000 -parameters = require './parameters' +# load configuration +c = require('./config/config') +for k, v of c + exports[k] = v + +# load parameter aliases +parameters = require('./config/parameters') aliases = {} -for k,v of parameters +for k, v of parameters a = v.alias if a? if not aliases[a]? diff --git a/config/config.json b/config/config.json new file mode 100644 index 0000000..a6146c4 --- /dev/null +++ b/config/config.json @@ -0,0 +1,16 @@ +{ + "DATABASE_NAME" : "genie", + "MONGODB_SOCKET" : "/tmp/mongodb-27017.sock", + "MEMCACHED_SOCKET" : "/tmp/memcached.sock", + "ACS_INTERFACE" : "0.0.0.0", + "ACS_PORT" : 7547, + "ACS_HTTPS_INTERFACE" : "0.0.0.0", + "ACS_HTTPS_PORT" : 7548, + "API_INTERFACE" : "0.0.0.0", + "API_PORT" : 7557, + "FILES_INTERFACE" : "0.0.0.0", + "FILES_PORT" : 7567, + "FILES_IP" : "172.240.21.2", + "LOG_INFORMS" : false, + "DEBUG_DEVICES" : {} +} diff --git a/parameters.json b/config/parameters.json similarity index 100% rename from parameters.json rename to config/parameters.json