mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
d2208fae83
commit
82b863805d
@ -114,7 +114,7 @@
|
|||||||
function debugConnect() {
|
function debugConnect() {
|
||||||
//console.log("debug ws connecting");
|
//console.log("debug ws connecting");
|
||||||
var path = location.hostname+":"+location.port+document.location.pathname;
|
var path = location.hostname+":"+location.port+document.location.pathname;
|
||||||
path = path+(path.slice(-1) == "/"?"":"/")+"debug";
|
path = path+(path.slice(-1) == "/"?"":"/")+"debug/ws";
|
||||||
path = "ws"+(document.location.protocol=="https:"?"s":"")+"://"+path;
|
path = "ws"+(document.location.protocol=="https:"?"s":"")+"://"+path;
|
||||||
var ws = new WebSocket(path);
|
var ws = new WebSocket(path);
|
||||||
ws.onopen = function() {
|
ws.onopen = function() {
|
||||||
|
@ -79,7 +79,11 @@ DebugNode.send = function(msg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DebugNode.activeConnections = [];
|
DebugNode.activeConnections = [];
|
||||||
DebugNode.wsServer = new ws.Server({server:RED.server});
|
|
||||||
|
var path = RED.settings.httpRoot || "/";
|
||||||
|
path = path + (path.slice(-1) == "/" ? "":"/") + "debug/ws";
|
||||||
|
|
||||||
|
DebugNode.wsServer = new ws.Server({server:RED.server,path:path});
|
||||||
DebugNode.wsServer.on('connection',function(ws) {
|
DebugNode.wsServer.on('connection',function(ws) {
|
||||||
DebugNode.activeConnections.push(ws);
|
DebugNode.activeConnections.push(ws);
|
||||||
ws.on('close',function() {
|
ws.on('close',function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user