How do we handle nodejs app crashes with Railway ?
Just trying to fix this issue. I think I have to remove nodemon from the general dependencies and add them to dev dependencies.
Solution:Jump to solution
I can't believe that worked
nodemon should work in prod ( definitally not recommended though )
oh well, if it works it works...
20 Replies
Project ID:
2857c8f8-a68c-485d-98fa-3a2df426f138
2857c8f8-a68c-485d-98fa-3a2df426f138
why does it crash?
is that all the logs?
from that first line, it kinda gives me the impression that something is not compatible with the current version of nodejs
just a hunch though, we can make sure if you send all the logs
hey sorry
I had to remove nodemon from script like you said
that fixed it??
:o
I removed it and tried again
yeah lol thank you!
Sorry for wasting your time
Solution
I can't believe that worked
nodemon should work in prod ( definitally not recommended though )
oh well, if it works it works
I havent thought about optimizing anything for prod
before i only had 1 start
now I have start-dev and start
yea, that's perfect
Thank you!
out of curiosity, what's the point of
prestart
?
why not just run build
directly? ( btw railway auto runs build for you )was using chatgpt
no point lol
😂
oh ok
I wanted to ask if you have recommendations as well
like how to optimize nodejs apps for prod
as far as I know, as long as you're compiling your TS to JS in build and you're not using dev environment tools like nodemon to run your app, it should be fine for prod
Thank you sir ! 😄
np!