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

Node.js web shop

Next, we want to run our JavaScript web shop. We will need at least PM2, which we already used to run our Selenium tests in Jenkins. This time, we will need to install PM2 globally:

sudo npm install pm2 -g

The easiest way to test if everything, including NGINX, works is by going directly into our Jenkins workspace and starting our index.js file from there. I am assuming you have the entire pipeline example on your Linux VM:

cd /var/lib/jenkins/web-shop-pipelinepm2 start index.js --name=webshop-js -- --port=8889pm2 ls

Try browsing to ciserver:8888 in your Windows host again and you should now see your web shop!

Of course, we do not want to run our application from a Jenkins folder. Instead, we should get our files from Jenkins ...

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