https://github.com/nuxt/nuxt.js/tree/master/examples/with-sockets
有人能解释为什么 io 模块正在创建socketio服务器?所有的socketio配置都已经在server.js中完成了,所以这不是 模块冗余?
io
有两种不同的方法。这个 server.js 是以编程方式将Nuxt与WebSockets一起使用的示例。使用时 nuxt.config.js 与 io 模块,它工作“独立”。
server.js
nuxt.config.js
引自 me here
说明也可在 dev 分支( here
dev