forked from lbsadmin/nodeMessageBoard
Move debug to config
This commit is contained in:
parent
d1a99e9f65
commit
462b2a0f9e
2
app.js
2
app.js
@ -2,7 +2,7 @@ var server = require("./server");
|
|||||||
var router = require("./route");
|
var router = require("./route");
|
||||||
var requestHandlers = require("./requestHandlers");
|
var requestHandlers = require("./requestHandlers");
|
||||||
|
|
||||||
var debug = false; // todo move this to configfile
|
var debug = server.debugMode();
|
||||||
|
|
||||||
var handle = {}
|
var handle = {}
|
||||||
handle["/"] = requestHandlers.sendInterface;
|
handle["/"] = requestHandlers.sendInterface;
|
||||||
|
@ -21,6 +21,10 @@
|
|||||||
{
|
{
|
||||||
"param": "demoMode",
|
"param": "demoMode",
|
||||||
"value": true
|
"value": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"param": "debugMode",
|
||||||
|
"value": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,11 @@ module.exports.demoMode = function () {
|
|||||||
return config('debug').chain().find({ param: 'demoMode' }).value()['value'];
|
return config('debug').chain().find({ param: 'demoMode' }).value()['value'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module.exports.debugMode = function () {
|
||||||
|
return config('debug').chain().find({ param: 'debugMode' }).value()['value'];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// utility function for ucs2 decode
|
// utility function for ucs2 decode
|
||||||
function ucs2Parse(ucs2){
|
function ucs2Parse(ucs2){
|
||||||
codeArray = ucs2.match(/.{1,4}/g);
|
codeArray = ucs2.match(/.{1,4}/g);
|
||||||
|
Loading…
Reference in New Issue
Block a user