My Nuxt JS 3 Nitro backend socket.io works only on dev mode.
My Nuxt app is running on port 3000 and the socket.io server on 3001.
When i push to railway production's the socket.io server is not accessible
Solution:Jump to solution
you need to run both on the same port as you can't expose more than one port on railway
4 Replies
Project ID:
N/A
Solution
you need to run both on the same port as you can't expose more than one port on railway
Thanks @Brody .
I found this solution where they use a proxy to make websocket works on same port as nuxt.
https://github.com/nuxt/nuxt/blob/00d2b90ea074d2cc23393610f5ddcb9943421745/docs/2.guide/3.going-further/12.websocket-servers.md
Do you know where can i define my createProxyServer on Nuxt JS 3 app? The .md does not specify
GitHub
nuxt/docs/2.guide/3.going-further/12.websocket-servers.md at 00d2b9...
Nuxt is an intuitive and extendable way to create type-safe, performant and production-grade full-stack web apps and websites with Vue 3. - nuxt/nuxt
I'm sorry but these threads are for platform help, you would want to read the nuxt docs for help with your question