Hey,
I came across your project it's interesting.
You said that You can't able to install pm2 which is nodejs package.I think there will error occurs and we need to solve this.I can solve it for you.
You want to restart your application automatically It's quite easy I used to use an Npm for that and we need to do some locally configuration for doing that.
I am NodeJS developer and used to do that lot's of time.
Feel free to leave me.
Cheers,