October 2017
Intermediate to advanced
458 pages
11h 13m
English
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 ...
Read now
Unlock full access