I have reactjs project that need to be run on the linux server. Whenever I run the app on server using "sudo npm run lin_stage_server" it seems to be working fine on 80 port. when I tried to run app through pm2 with command "sudo pm2 start npm -- lin_stage_server" its not working for me.
In addition to the above command i also tried
"sudo pm2 start npm -- BRANCH_ENV=stage NODE_ENV=production PORT=80 node appserverstart.js
"
Please help !
----- Error details ------
----- Package.json -----
----- appserverstart.js -----
-------Additional info------- server: CentOS Linux version 7 core, npm version: 6.4.1, pm2 version: 3.5.1, node version: 8.11.1,