0👍
I don’t think that approach is correct mate. You are trying to create a socket inside http endpoint, that will not work. Here’s gist I found that demonstrates using NodeJS Socket.
https://gist.github.com/tedmiston/5935757
I’ll recommend using into something like Socket.io. They have good amount of documentation to get off the ground.
- [Vuejs]-Dynamically Display Remotely Populated Dropdown in Vue.JS
- [Vuejs]-Bootstrap-vue b-dropdown ul menu set to hidden not display none
Source:stackexchange.com