Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
Now that you have an idea of what Node.js can do, try executing JavaScript code from the command line.
Commands
Running a node application
node <filename>
Running the node REPL (Read-Eval-Print-Loop)
node
To exit the REPL use CTRL+D once or CTRL+C twice.
The code .
command
In the video you see Reggie opening up his VS code using the code .
command. In order to use this you'll have to enable this option in VS code first.
Inside VS code open up the Command Pallet with ctrl/cmd + shift + p
or by navigating to view
=> Command Palette
. Then search for shell
and you should be presented with the option Shell Command: Install 'code' command PATH
.
After clicking that option and refreshing your terminal the code
command will be available.
Documentation
Node.js Installation
If you'd rather work in your own IDE you can install Node.js from the Node.js website. We suggest downloading the LTS version.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up