Cover by David Mark Clements

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

O'Reilly logo

Generating Express scaffolding

Express works both as a Node module and as a command-line executable. When we run express from the command line it generates a project skeleton for us, accelerating the preparation process.

Getting ready

We need to install express using the -g flag (install globally) in order to run the express executable from any directory.

sudo npm -g install express

We use sudo to ensure we get permission to install globally. This doesn't apply under Windows.

How to do it...

First, we decide upon the name of our app. Let's call it nca (Node Cookbook App) and simply do:

express nca

This will generate all of our project files under a new directory called nca. Before we can run our app, we must ensure that all dependencies are installed. ...

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