PM2 let you create a config file to save all information to start your sever properly at anytime.
By running `pm2 init` it will init an `ecosystem.config.js` in your application.
Then replace the content of this files by the following code
```js
module.exports = {
apps: [
{
name: 'app',
script: 'npm',
args: 'start',
},
],
};
```
And then run `pm2 start ecosystem.config.js` to start the pm2 process.
You can see the full documentation of available configuration in the [PM2 ecosystem file documentation](https://pm2.keymetrics.io/docs/usage/application-declaration/).