Socket.io keeps connecting repeatedly and ignores other events
问题 I'm attempting to make a webapp where users can play toroidal chess with each other. This is my app.js, on the server: var express = require('express'); var app = express(); var http = require('http').Server(app); var io = require('socket.io')(http); var port = process.env.PORT || 8000; app.use(express.static('public')); app.get('/', function(req, res) { res.sendFile(__dirname + '/public/index.html'); console.log("Got request for homepage"); }); io.on('connection', function(socket){ console