Reputation: 3417
I was looking into how to use socket.io with Nuxt and came across this: https://github.com/nuxt/nuxt.js/tree/master/examples/with-sockets
Can someone explain why the io
module is creating a socketio server? All the socketio configuration is also being done in server.js already so isn’t that part of the io
module redundant?
Upvotes: 0
Views: 7091
Reputation: 7299
There are two different approaches. The server.js
is an example of using Nuxt programmatically with WebSockets together. When using nuxt.config.js
with the io
module, it works "standalone".
Quoted from me here
The description also available in the dev
branch (here)
Upvotes: 1