This forum provides solutions for aws developers for their issues.It provides solutions for aws elastic ip, ec2 instance, public ip,route53 pricing, load balancers in aws,Orchestration, ebs,, lambda, installing mongodb on ubuntu etc.

Friday 1 June 2018

Best Practices to run Nodejs

The safe user does not have permissions to use default http port 80.
Do not run your applications as a root.

To use http port for non root user,
use the below

sudo apt-get install libcap2-bin

 sudo setcap cap_net_bind_service=+ep `readlink -f \`which node\``


Now you can able access default http port.

 

for nodejs

node app.js

production:

pm2 start app.js

forever start app.js

 

 

instead of sudo node app.js

sudo pm2 app.js

etc.

0 coment�rios:

Post a Comment

Labels

Online Training

Your Name :
Your Email: (required)
Your Message: (required)

Powered by Blogger.

Recent Posts

Find Us On Facebook

Popular Posts