In this lesson, you kick off Node.js application development by creating a Node.js module (JavaScript file). Then you introduce npm to the development workflow and learn about some common npm commands and tools for setting up a new application.
This lesson covers
- Creating a Node.js module
- Constructing a Node.js application with npm
- Installing a Node.js package with npm
Consider this
You want to build an application to help people share food recipes and learn from one another. Through this application, users can subscribe, join online courses to practice cooking with the application’s recipes, and connect with other users.
You plan to use Node.js to build this web application, and you want to start by verifying users’ ZIP codes to determine the locations and demographics of your audience. Will you need to build a tool for checking ZIP codes in addition to the application?
Luckily, you can use npm to install Node.js packages—libraries of code others have written that add specific features to your application. In fact, a package for verifying locations based on ZIP codes is available. You take a look at that package and how to install it in this lesson.