November 2013
Intermediate to advanced
148 pages
3h 12m
English
As for all Node modules, to use Express you have to install it with npm. The example project we’re working from already specifies a dependency on Express, so all we have to do is run npm install. If you were making your own project, you’d want to run npm install --save express to pull down the latest Express available and record the dependency in your package.json file.
Let’s take a look at a Hello World Express app to get a feel for how it works. Then we’ll expand on this skeleton to make our own RESTful APIs. In the terminal, navigate to the hello subdirectory of the example project. Here is the content of the server.js file you’ll find there:
| web-services/hello/server.js | |
| | #!/usr/bin/env node --harmony |
| | 'use strict' ... |
Read now
Unlock full access