Use socket.io inside a express routes file

后端 未结 6 1074
刺人心
刺人心 2020-11-28 05:05

I\'m trying to use Socket.io with Node.js and emit to a socket within the logic of a route.

I have a fairly standard Express 3 setup with a server.js file that sits

6条回答
  •  萌比男神i
    2020-11-28 05:57

    module.parent.exports.server would also work if you exported server in the parent module.

提交回复
热议问题