I am using pm2 to launch my NodeJS/Angular application in production mode. Im running the application on port 80 and have given premissions to the user by: sudo setcap cap_net_bind_service=+ep /usr/local/bin/node
. The website works but I get some kind of access error in the logs:
Error: listen EACCES
at errnoException (net.js:904:11)
at Server._listen2 (net.js:1023:19)
at listen (net.js:1064:10)
at Server.listen (net.js:1138:5)
at Function.app.listen (/home/nodeuser/Disri/dist/node_modules/express/lib/application.js:533:24)
at Object.<anonymous> (/home/nodeuser/Disri/dist/server.js:44:5)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
events.js:72
throw er; // Unhandled 'error' event
^
What could cause this error?