What is Node?

Node.js is a JavaScript runtime, or an environment which runs JavaScript code outside of the browser. A “runtime” converts code written in a high-level, human-readable, programming language and compiles it down to code the computer can execute. Node was created with the goal of building web servers and web applications in JavaScript, but it’s a powerful and flexible environment that can be used for building all sorts of applications. Check out our lesson on Node to get to know the environment!

Installing Node

When you’re ready, running Node on your own computer is an exciting step towards becoming a developer. Playing on the Node REPL in your own terminal and executing your first local JavaScript program will set you on your way to building all sorts of exciting projects.

Before you install Node, you’ll need to make sure you have your command line set up.

Navigate to the Node website, and download the version of Node labeled “LTS” on the main page of the. For additional download options, such as different operating systems and versions, you can navigate to the Node downloads page.

After your download is complete, open the downloaded installation package and follow the installation instructions.

After installation, open a new terminal window. To confirm Node was downloaded, you can run the terminal command which node which will print the filepath to Node. You can also check which version of Node you downloaded with the node -v terminal command.

Mac

Windows