From 790973cce2ce6fd0e4d664b2c18f367e0c716386 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Thu, 12 Jul 2018 21:04:53 -0400 Subject: [PATCH] Fiddle with websocket for hosting on server --- client.js | 2 +- server.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client.js b/client.js index b0d68fb..22c143d 100644 --- a/client.js +++ b/client.js @@ -95,7 +95,7 @@ function alertVoltage(callsign) { `Voltage: ${stations[callsign].lastVoltage}`); } -let aprsStream = new WebSocket("ws://localhost:1234"); +let aprsStream = new WebSocket("wss://adamgoldsmith.name/APRSws"); aprsStream.onmessage = function(event) { let message = JSON.parse(event.data); let callsign = `${message.from.call}-${message.from.ssid || 0}`; diff --git a/server.js b/server.js index 5c7e15d..e580b05 100644 --- a/server.js +++ b/server.js @@ -4,7 +4,7 @@ let aprs = require("aprs-parser"); const parser = new aprs.APRSParser(); const client = new net.Socket(); -const wss = new WebSocket.Server({port: 1234}); +const wss = new WebSocket.Server({host: "127.0.0.1", port: 1234}); wss.broadcast = function(data) { wss.clients.forEach(client => {