Fix websocket being inaccessible

This commit is contained in:
bingus_violet 2024-07-06 22:38:13 -05:00
parent e59d592c76
commit 4aa3367d70

View file

@ -10,10 +10,6 @@ var app = express()
app.use(express.static(paths.data)) app.use(express.static(paths.data))
app.listen(PORT, () => {
console.log("Violet's Limbo is now listening on port: " + PORT)
})
var sockets = [] var sockets = []
wsServer = WebSocket.Server; wsServer = WebSocket.Server;
@ -44,6 +40,10 @@ wsServer.on("connection", function connection(socket) {
sockets.push({ socket, lastPing: Date.now() }) sockets.push({ socket, lastPing: Date.now() })
}) })
server.listen(PORT, function () {
console.log("Blog API and WebSocket on port: " + PORT)
})
module.exports = { module.exports = {
app: app app: app