0👍
✅
Found the issue and it’s almost stupid. The socket library doesn’t support VueJS 3, it supports only vueJS 2. So there are 2 alternatives to get this working, the first is Vue-3-Socket.io and the second is this alpha version of Vue-Socket.io-Extended. I went for the second one and it gets the work done.
1👍
Can you add this express middleware code to allow cross origin request in the Socket IO Server.
app.use(function (req, res, next) {
res.header('Access-Control-Allow-Origin', '*');
next()
})
Source:stackexchange.com