I set my MEAN (non-meteor) app up on a MEAN image on digital ocean. I can ssh in and start it with
NODE_ENV=production PORT=80 node server.js
But when I close my terminal, the SSH session terminates and node stops running (obviously, I guess). I’d like it running 24 hrs/day like a normal production app.
I’ve only ever used galaxy where I just deploy and the app is there running… no need to keep ssh open. How do you get the same result with a MEAN app on digital ocean?
Note: this isn’t a production app, it’s just a practice/portfolio app. I don’t need an enterprise-level solution, just the quick and dirty way to get it up there. I’ve seen on SO talk about a npm ‘forever’ package, a “screen” package and a couple other things… what do I do?!
I’m kind of flabbergasted there isn’t a straightforward way to do this…
Anytime i do anything outside of meteor + galaxy, I wonder why anybody does anything outside of meteor + galaxy!
There are few answers here but they seem kind of esoteric to me: