Join our book community on Discord
https://packt.link/EarlyAccess
In this chapter, I explain the simple process of getting started with Node.js, beginning with the simple steps that are required to prepare for development. I explain how to execute JavaScript code using Node.js and then I introduce the real power in Node.js development: the Node package manager (npm). npm is the tool that does most of the work during development, taking responsibility for everything from downloading and installing JavaScript packages, reporting on security vulnerabilities, and running development commands. Table 2.1 summarizes the chapter.
Table 2.1. Chapter SummaryProblem | Solution | Listing |
Execute a JavaScript file. | Use the node command. |
5 |
Initialize a project for use with JavaScript packages. | Use the npm init command. |
6 |
Add a JavaScript package to a project. | Use the npm install command. Use the --save-dev argument for development tool packages. |
7, 8 |
List the packages in a project. | Use the... |