Summary
In this chapter, we explored how to create a package from scratch, and how to install and maintain our dependencies over time. We learned how to use the package.json
file to manage our dependencies, and how to use the package-lock.json
file to lock the dependencies versions.
Additionally, we learned how to use npm scripts to automate tasks, and how to use global dependencies and npx
to run commands without installing them globally.
Finally, we learned how to create our own packages and publish them in the npm registry, and how to update them over time.
In the next chapter, we will learn how to take advantage of the event-driven architecture in Node.js to create our own events and listen to them, and how core libraries such as HTTP use events to notify us about incoming requests and much more. We will build our first web server using the HTTP library.