Setting Up Node Locally
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 course on Node to get to know the environment!
Learn Node.js: Fundamentals
Get an introduction to Node.js—a JavaScript runtime environment typically used to build back-end apps.Try it for freeInstalling 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. 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.
Note: The current LTS version of Node.js is v14.17.1. The Node version used in the videos below is older, but the installation process remains the same. If the node
command is not found, try closing and reopening the terminal/Git Bash window.
Mac
Windows
Author
'The Codecademy Team, composed of experienced educators and tech experts, is dedicated to making tech skills accessible to all. We empower learners worldwide with expert-reviewed content that develops and enhances the technical skills needed to advance and succeed in their careers.'
Meet the full teamRelated articles
- Article
Setting Up Node
Install Node on your computer to utilize Node packages - Article
What is Node?
Learn about Node.js, a JavaScript runtime for building server-side or desktop applications. - Article
Introduction to JavaScript Runtime Environments
An introduction to the Node runtime environment and a browser's runtime environment.
Learn more on Codecademy
- Free course
Learn Node.js: Fundamentals
Get an introduction to Node.js—a JavaScript runtime environment typically used to build back-end apps.Beginner Friendly3 hours - Free course
Learn Node.js
Learn about the different components of a web application's back-end and explore the Node.js JavaScript runtime environment.Intermediate5 hours - Skill path
Create a Back-End App with JavaScript
Learn how to build back-end web APIs using Express.js, Node.js, SQL, and a Node.js-SQLite database library.Includes 8 CoursesWith CertificateBeginner Friendly30 hours