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
Project ID:
ba58e211-41c6-4805-a274-4ea8e333027a
ba58e211-41c6-4805-a274-4ea8e333027a
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.
im guessing in the frontend part itself.
can you share any github repo of yours where i can look into it? for reference
Yeah sure
There’s two repos
Here’s the frontend
GitHub
GitHub - mattsrobot/gh-issues
Contribute to mattsrobot/gh-issues development by creating an account on GitHub.
Here’s the backend
GitHub
GitHub - mattsrobot/gh-issues-sync
Contribute to mattsrobot/gh-issues-sync development by creating an account on GitHub.
ok thanks. I'll look into it.
The frontend uses a websocket to connect to the backend websocket server
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.
I'll go through it. Thanks a lot
Welcome 🙏