2 years ago
Hi guys! I am facing some issues while trying to deploy my first backend project. I chose to use railway to host the project, and i ran into some issues at first: forgot to write the node run script in the package.json, didn't write the port variable as railway requests (using the "0.0.0.0" port), but after doing all these things i did manage to make it work. I checked the website today and it's not working anymore, i get a 502 bad gateway error. checked the railway website and it says my app is active and all is well, no crashes, no errors. anyone knows what the problem could be? I tried restarting the deployment and got this error:npm err! path /app npm err! command failed npm err! signal sigterm npm err! command sh -c node app.js
at this point, i tried redeploying it, the app build successfully with no errors, but when i access the website i still get the same error: 502 bad gateway.
here is my code: https://github.com/SilviuHg/message-board
and my website: https://silviuhg-message-board.up.railway.app/
2 Replies
2 years ago
any ideas?
a year ago
Just in case this helps any time travelers out there, my issue was caused by an improperly set connection string to my mongoDB. It would connect and then immediately kill the application. Converting my static URL to a shared environment URL solved this issue.