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

Building a REST service

The first thing we have to do is create a little REST service. Representational State Transfer (REST) basically means that a service is stateless and makes use of the standard HTTP verbs like GET, PUT, POST, and DELETE. That makes it a bit easier for us to write. We can create a RESTful service using Node.js and Express, pretty much like we did before. So, create a new folder and name it web-api or some such. Next, we need our package.json file, so start up a command prompt and use the npm init command. You can leave all the defaults, as we are not really going to do anything with them anyway. Next, we can install Express, the body-parser, and the command-line-args package:

npm install express --savenpm install body-parser ...

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