Introduction

Completed

When you work on an application, you write code to implement business requirements. For the sake of speed and reliability, you and your team might not write all the code yourselves. You might rely on external code, or packages, that someone else wrote.

One way to approach building your app with external packages is to use an existing ecosystem of packages that you can download from and possibly even add to. By using these packages, you'll be able to finish building your app sooner and take it to market faster than the competition. Another benefit to using packages could be to ensure your app follows recommended practices for authentication and authorization. After all, protecting your data and your customers' data is a significant concern.

In this module, you'll use the npm command-line tool and the npm global registry to add packages to your application code. You'll also be introduced to managing updates and mitigating issues.

Learning objectives

After you complete this module, you'll be able to:

  • Set up a dev container as your development environment
  • Initialize Node.js projects like a pro
  • Understand the secrets of the manifest file package.json and use it to your advantage
  • Add and remove packages from your Node.js project with ease
  • Manage your package dependencies and update them in a predictable way

Prerequisites

  • Familiarity with editing text and code files in a text editor
  • Experience with using the command line, including using it for Git operations
  • Experience using JavaScript functions and variables
  • Development environment, either one of these:
    • GitHub account to use GitHub Codespaces to use a browser-based environment
    • Visual Studio Code and Docker to use local environment