From 1536dcdf1eca509816e0b5f2289a60f96c8420b8 Mon Sep 17 00:00:00 2001 From: Nicholas O'Leary Date: Mon, 11 Nov 2013 21:16:57 +0000 Subject: [PATCH] Add httpStatic setting --- red.js | 4 ++++ settings.js | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/red.js b/red.js index 43ea856a8..d3d4df7f8 100644 --- a/red.js +++ b/red.js @@ -54,6 +54,10 @@ settings.flowFile = process.argv[2] || settings.flowFile; var red = RED.init(server,settings); app.use(settings.httpRoot,red); +if (settings.httpStatic) { + app.use("/",express.static(settings.httpStatic)); +} + RED.start(); var listenPath = 'http'+(settings.https?'s':'')+'://'+ diff --git a/settings.js b/settings.js index ce7cb47fe..ad5078508 100644 --- a/settings.js +++ b/settings.js @@ -40,6 +40,11 @@ module.exports = { // The following property can be used to specifiy a different root path. //httpRoot: '/admin', + // When httpRoot is used to move the UI to a different root path, the + // following property can be used to identify a directory of static content + // that should be served at http://localhost:1880/. + //httpStatic: '/home/nol/node-red-dashboard/', + // The following property can be used to enable HTTPS // See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener // for details on its contents.