What is Node.js?
Node.js is a JavaScript runtime that uses the same engine as Google Chrome. With Node.js, you can run JavaScript applications on your computer, without the need for a web browser.
In the early 2000s, services such as Gmail and Flickr showed us that JavaScript could be used to build robust applications, available to anyone with a web browser and internet connection.
However, those JavaScript applications had a big limitation: they could only perform as well as the runtime allowed. Before 2009, the runtime was almost always a web browser. So Google formed the Chromium Project, in part, to create a faster browser. The result was Google Chrome, released in 2008, and its new JavaScript engine: V8.
A year later, Node.js made its debut as a standalone JavaScript runtime using the V8 engine.
Once you’ve installed Node.js, you can use it to run JavaScript from the command line. Type node
at a prompt to launch the Node.js interactive shell. Include the path to a JavaScript file to execute that script: e.g. node /Users/gatsbyfan/hello-world.js
.
You will need to install Node.js before using Gatsby. Gatsby is built using JavaScript, and requires the Node.js runtime.
Learn more about Node.js
- Node.js official website
- Introduction to Node.js
- NodeSchool offers online and in-person Node.js workshops
- V8 developer blog website