Create lib dir on start-up if needed

This commit is contained in:
Nicholas O'Leary 2013-09-20 14:21:45 +01:00
parent 8eb2bcbd9c
commit 6f8adc9f14
1 changed files with 6 additions and 1 deletions

View File

@ -29,7 +29,12 @@ function createServer(_server,settings) {
//TODO: relocated user dir
var rulesfile = process.argv[2] || 'flows_'+host+'.json';
fs.exists("lib/",function(exists) {
if (!exists) {
fs.mkdir("lib");
}
});
app.get("/nodes",function(req,res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write(redNodes.getNodeConfigs());