Deploy as service with forever

forever is a simple CLI tool for ensuring that a given script runs continuously.

First, install forever CLI globally using:

Copy
`npm i -g forever`

Then run the server using the following:

Copy
forever start dist/main.js

To stop the server, execute:

Copy
forever stopall
See the forever documentation for more commands.