Websocket in Spring Boot not working after deployment

Hello. I was deploying a spring boot app with websockets. For some reason, the connection to the websocket is not happening. is there something i need to change in the railway dashboard? coz the app is running fine in local.
15 Replies
Percy
Percy5mo ago
Project ID: ba58e211-41c6-4805-a274-4ea8e333027a
shm-dsgn
shm-dsgn5mo ago
ba58e211-41c6-4805-a274-4ea8e333027a
macwilko
macwilko5mo ago
It should work fine on railway without any changes. Where does the connection fail? I think the only change I make when going from local to railway, is I use wss:// for secure websocket.
shm-dsgn
shm-dsgn5mo ago
im guessing in the frontend part itself.
No description
shm-dsgn
shm-dsgn5mo ago
No description
shm-dsgn
shm-dsgn5mo ago
can you share any github repo of yours where i can look into it? for reference
macwilko
macwilko5mo ago
Yeah sure There’s two repos Here’s the frontend
macwilko
macwilko5mo ago
GitHub
GitHub - mattsrobot/gh-issues
Contribute to mattsrobot/gh-issues development by creating an account on GitHub.
macwilko
macwilko5mo ago
Here’s the backend
macwilko
macwilko5mo ago
GitHub
GitHub - mattsrobot/gh-issues-sync
Contribute to mattsrobot/gh-issues-sync development by creating an account on GitHub.
shm-dsgn
shm-dsgn5mo ago
ok thanks. I'll look into it.
macwilko
macwilko5mo ago
The frontend uses a websocket to connect to the backend websocket server
shm-dsgn
shm-dsgn5mo ago
https://github.com/shm-dsgn/springboot-chatapp here's mine. it's in spring boot, maybe i need to add some additional properties in the backend itself. might be the case.
GitHub
GitHub - shm-dsgn/springboot-chatapp
Contribute to shm-dsgn/springboot-chatapp development by creating an account on GitHub.
shm-dsgn
shm-dsgn5mo ago
I'll go through it. Thanks a lot
macwilko
macwilko5mo ago
Welcome 🙏