Installing Express

Up until now, we used npm to directly install external modules for our Node application. You could, of course, use this approach and install Express by typing the following command:

$ npm install express

But, directly installing modules isn't really scalable. Think about it for a second: you're going to use many Node modules in your application, transfer it between working environments, and probably share it with other developers. So, installing the project modules this way will soon become a dreadful task. Instead, you should start using the package.json file that organizes your project metadata and helps you manage your application dependencies. Begin by creating a new working folder and a new package.json file inside it, ...

Get Web Application Development with MEAN now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.