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

Express

To make things easier for ourselves in the long run, we are going to use a framework for Node.js. Node is pretty bare bones, which means it can do everything, but it probably needs some work. That work is done for us in different frameworks that all work a little differently. Express (https://expressjs.com/) is one of the more popular frameworks (among Hapi.js and Sails.js), so let's go with that. Simply install Express using npm. Please note that we need Express to run the software, so we use --save instead of --save-dev:

npm install express --save

We can now change our file so it uses Express. We do not need to require the http module because Express has that all wrapped for us. Other than that, the code looks pretty much the same. ...

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