The problem of root permission when pm2 triggers restart

start the node program using pm2 to listen on port 80

when starting, there is no problem using sudo to start with root permissions. At that time, I executed pm2 restart
through git hook"s shell script or set pm2-- when watch triggers restart, pm2 does not have permission to listen on port 80,

come out and use nginx port mapping, is there any other way.

1. Can pm2 be allowed to own root permissions
2. Can I have the instruction executed by my shell with root permission

this rookie, I don"t know much about linux and backend. Please give me your advice.

Mar.20,2021

has been found
add permissions to the application < path >
if you need to query the installation directory of the application
whereis < name >

Menu