These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
You need some node module that would allow to run it forever.
I can recommend you two - pm2 or forever. I’m more on side of pm2 as it have better process management. Also there are tutorials on DO for setting it up.
Follow PM2 part of Set Up Node.js App for Production. It’ll show you how to make it run always and as a service (e.g. automatically run it when servers reboot or after power on)
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.