O'Reilly logo

Continuous Integration, Delivery, and Deployment by Sander Rossel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

PM2

To run and manage Node.js applications, you will need something more sophisticated than nodemon. The tool we are going to use is PM2, an advanced, production process manager for Node.js (http://pm2.keymetrics.io/). We are going to install it locally for Jenkins and globally for our convenience:

npm install pm2 --save-devnpm install pm2 -g

With PM2, we can start and stop Node.js scripts:

pm2 start index.jspm2 listpm2 stop index.jspm2 delete index.jspm2 kill

In the command user interface we can see that our website is actually running.

In Jenkins, we have a bit of a problem though, we can start up PM2 and run our tests, but when our tests ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required