I wanted to know standard process to deploy nodejs app on production. As of now I am following the process as below
Pull the source code
git pull git_url
Install npm dependencies
npm install
Build the code
npm run build
run the application
nohup node server/index.js &
But I am thinking of pulling source code to prod is the totally wrong way. Please, someone, guide me the exact way to deploy node app on the production server. Also, any other way to run the app continuously as service. I am aware with pm2 module to run a process in the backend. If there is any other way to manage it properly.