Fix websocket being inaccessible
This commit is contained in:
parent
e59d592c76
commit
4aa3367d70
1 changed files with 4 additions and 4 deletions
|
@ -10,10 +10,6 @@ var app = express()
|
|||
|
||||
app.use(express.static(paths.data))
|
||||
|
||||
app.listen(PORT, () => {
|
||||
console.log("Violet's Limbo is now listening on port: " + PORT)
|
||||
})
|
||||
|
||||
var sockets = []
|
||||
|
||||
wsServer = WebSocket.Server;
|
||||
|
@ -44,6 +40,10 @@ wsServer.on("connection", function connection(socket) {
|
|||
sockets.push({ socket, lastPing: Date.now() })
|
||||
})
|
||||
|
||||
server.listen(PORT, function () {
|
||||
console.log("Blog API and WebSocket on port: " + PORT)
|
||||
})
|
||||
|
||||
|
||||
module.exports = {
|
||||
app: app
|
||||
|
|
Loading…
Reference in a new issue