Fiddle with websocket for hosting on server
This commit is contained in:
parent
70dcdf5d4f
commit
790973cce2
@ -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}`;
|
||||
|
@ -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 => {
|
||||
|
Loading…
Reference in New Issue
Block a user