Hi! I'm a frontend developer learning more about backend work. I followed a tutorial to create a MERN-stack app, and part of that included deploying my node/express API to Heroku using the Heroku CLI. Now that Heroku is removing their free-tier plans, I'm trying out Railway to host the API instead.
I followed the instructions from the Railway docs to set up my project using my Github monorepo. Here are some of my custom settings:
Root directory: /api
Start command: node index.js
I think where I'm stuck is the build command. I didn't need a build command for heroku, so I guess I'm wondering what Railway needs out of the build? When I build React projects, the build command generally outputs plain HTML, CSS, and JS files that the browser can serve—so what transformations are needed for an API build?
I don't even know if I'm asking the right question... so please correct me or send me reading materials or examples if you have them!
When I try to deploy, I see "connected to mongoose" in the logs, which, when I start my app locally, is how I know that it's started properly. But I think Railway is actually expecting a build process to occur once and finish, so it eventually times out and says that the build failed. When I'm in the middle of "deploying" and send a postman request to the URL, it shows the request in the logs but Postman never receives the response.
I guess I am just pretty stuck and I don't know what to try or even what to look up.
Project ID: b566b694-cdf9-49b1-b8f1-cf33649dffef