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:
you need to run both on the same port as you can't expose more than one port on railway
Jump to solution
4 Replies
Percy
Percy11mo ago
Project ID: N/A
Solution
Brody
Brody11mo ago
you need to run both on the same port as you can't expose more than one port on railway
Bruno Belloni
Bruno Belloni11mo ago
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
Brody
Brody11mo ago
I'm sorry but these threads are for platform help, you would want to read the nuxt docs for help with your question
Want results from more Discord servers?
Add your server