Chapter 2. Getting Started with Node
If you don’t have any experience with Node, this chapter is for you. Understanding Express and its usefulness requires a basic understanding of Node. If you already have experience building web apps with Node, feel free to skip this chapter. In this chapter, we will be building a very minimal web server with Node; in the next chapter, we will see how to do the same thing with Express.
Getting Node
Getting Node installed on your system couldn’t be easier. The Node team has gone to great lengths to make sure the installation process is simple and straightforward on all major platforms.
Go to the Node home page. Click the big green button that has a version number followed by “LTS (Recommended for Most Users).” LTS stands for Long-Term Support, and is somewhat more stable than the version labeled Current, which contains more recent features and performance improvements.
For Windows and macOS, an installer will be downloaded that walks you through the process. For Linux, you will probably be up and running more quickly if you use a package manager.
Caution
If you’re a Linux user and you do want to use a package manager, make sure you follow the instructions in the aforementioned web page. Many Linux distributions will install an extremely old version of Node if you don’t add the appropriate package repository.
You can also download a standalone installer, which can be helpful if you are distributing Node to your organization.
Using the Terminal ...
Get Web Development with Node and Express, 2nd Edition 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.