mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Create lib dir on start-up if needed
This commit is contained in:
parent
8eb2bcbd9c
commit
6f8adc9f14
@ -29,7 +29,12 @@ function createServer(_server,settings) {
|
|||||||
|
|
||||||
//TODO: relocated user dir
|
//TODO: relocated user dir
|
||||||
var rulesfile = process.argv[2] || 'flows_'+host+'.json';
|
var rulesfile = process.argv[2] || 'flows_'+host+'.json';
|
||||||
|
fs.exists("lib/",function(exists) {
|
||||||
|
if (!exists) {
|
||||||
|
fs.mkdir("lib");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
app.get("/nodes",function(req,res) {
|
app.get("/nodes",function(req,res) {
|
||||||
res.writeHead(200, {'Content-Type': 'text/plain'});
|
res.writeHead(200, {'Content-Type': 'text/plain'});
|
||||||
res.write(redNodes.getNodeConfigs());
|
res.write(redNodes.getNodeConfigs());
|
||||||
|
Loading…
Reference in New Issue
Block a user