需要 new Koa(); 端口 5757

const Koa = require('koa');
const app = new Koa();
const server = require('http').Server(app.callback());
const io = require('socket.io')(server);
const port = 5757;

io.on('connection', socket => {
})

server.listen(port)