Introduction to Node.js Introduction to Node.js

Install and Run Node.js Exercise

Check out a free preview of the full Introduction to Node.js course:
The "Install and Run Node.js Exercise" Lesson is part of the full, Introduction to Node.js course featured in this preview video. Here's what you'd learn in this lesson:

Scott introduces the first exercise: getting Node.js installed!

Get Unlimited Access Now

Transcript from the "Install and Run Node.js Exercise" Lesson

>> Scott Moss: Cool, so Exercise 1, like I said, we're gonna get to this exercise. You're gonna install Node on your machine. You're gonna verify your installation. And the way you verify is both of those command work. You should be able to type in node and you should see a REPL.

[00:00:14] If you type in node and it says I have no idea what Node is, open up a new window in your terminal and then try it. And if it still doesn't work, then your installation is corrupted or something. So we'll have to figure it out. Use the Node REPL and write some JavaScript.

[00:00:27] Do a log, do whatever you want, just write some JavaScript so you know that it's working. And then use the Node CLI executable against a JavaScript file. So just write a JavaScript file, it could literally, like I said, be a consult log. It could be anything, just the JavaScript that you know and love.

[00:00:42] Write something in a file and then use the Node CLI to execute that file. You can save it on your desktop, wherever you want to do it.