Separate out httpAdmin and httpNode

This commit is contained in:
Nick O'Leary
2014-02-16 00:39:30 +00:00
parent e6cf783d52
commit 7c24d4d760
15 changed files with 121 additions and 55 deletions

View File

@@ -83,7 +83,7 @@ InjectNode.prototype.close = function() {
}
}
RED.app.post("/inject/:id", function(req,res) {
RED.httpAdmin.post("/inject/:id", function(req,res) {
var node = RED.nodes.getNode(req.params.id);
if (node != null) {
try {

View File

@@ -80,7 +80,7 @@ DebugNode.send = function(msg) {
DebugNode.activeConnections = [];
var path = RED.settings.httpRoot || "/";
var path = RED.settings.httpAdminRoot || "/";
path = path + (path.slice(-1) == "/" ? "":"/") + "debug/ws";
DebugNode.wsServer = new ws.Server({server:RED.server,path:path});
@@ -104,7 +104,7 @@ DebugNode.logHandler.on("log",function(msg) {
});
RED.nodes.addLogHandler(DebugNode.logHandler);
RED.app.post("/debug/:id/:state", function(req,res) {
RED.httpAdmin.post("/debug/:id/:state", function(req,res) {
var node = RED.nodes.getNode(req.params.id);
var state = req.params.state;
if (node != null) {