diff --git a/pythonExample/example.py b/pythonExample/example.py index a46381f..76162e3 100644 --- a/pythonExample/example.py +++ b/pythonExample/example.py @@ -2,7 +2,7 @@ import websocket import json ws = websocket.WebSocket() -ws.connect("wss://server:3000") +ws.connect("wss://localhost:3000") ws.send(json.dumps({ "type":"jog", diff --git a/server/config/config.js b/server/config/config.js index 3761fc2..58fd1cb 100644 --- a/server/config/config.js +++ b/server/config/config.js @@ -6,6 +6,6 @@ module.exports = { }, server: { - port: Number(process.env.PORT) || 3000 + port: Number(process.env.PORT) || 10000 } }; \ No newline at end of file diff --git a/server/server.js b/server/server.js index bba9e08..9c0e7a6 100644 --- a/server/server.js +++ b/server/server.js @@ -37,6 +37,7 @@ wss.on("connection", (ws) => { try { const data = JSON.parse(msg); + console.log("Message from WSS: " + msg); if (data.type === "jog") { fluid.jog(data.axis, data.value); } diff --git a/web/index.html b/web/index.html index c487e1a..5de682e 100644 --- a/web/index.html +++ b/web/index.html @@ -5,7 +5,7 @@ SCARA Robot Control