Run pm2 with Environmental Variable

PM2 is an advanced production process manager for Node JS. You can get better reports, info about your running apps on Node JS Server. The best service that i got till now to host Node JS application is Digitalocean. They provide you with private VPS (a.k.a droplet) where you can run your Node JS applications. If you are looking for VPS, i suggest you to signup using this link. We can run your app.js with PM2 as following:

Normally if you want to run you Node JS app with Env_var, you can do it like this:

But Now if …

Continue Reading

Run MongoDb in Background

if you are looking for a way so that you can run your mongodb as a background process then you have to add –fork as a parameter. In order to Run MongoDb in background, you need to run following command.

–dbpath : database directory path. –port : port on which db will be running. –fork : this will allow this process to run in background, so this parameter is must. — logpath : path for logfile. Also Read :  Get user ip using Javascript/jQuery  Run pm2 with Environmental Variable  

Continue Reading