Before we talk about what no J.S. is or explore why it's a useful tool.
We're gonna go ahead and install it.
And the reason we're installing it first is because we're actually going to use a little bit of node
j s in this section to answer those two important questions in this video.
We're gonna install no J Yes it's a super easy process and we're also going to make sure you have a
text editor on your machine so we can use it to write our scripts throughout the class.
Let's go ahead and get started by installing node we can find it over at the official node Web site
node j s dot org.
Right here on the Node J.S. home page we have the download section for our operating system.
Right here.
I am indeed running on a Mac and down below.
I have two node versions I could choose to install on the left I have version eight point twelve point
zero which is the current L2 yes version that stands for long term support and on the right I have version
eleven point zero point zero which is the current release with the latest features and that's the version
of node we're going to work with throughout the class.
This is Andrew from the future with a quick update.
You'll notice that now the LTE version is ten point fifteen point three and the current release is 12
point one point zero.
I've updated the class and to get the most out of the course it is now recommended that you use version
twelve or greater.
All right that's it for this quick interruption.
Let's get back to the course now if you're seeing a more recent current version.
Please go ahead and install that.
I'm frequently updating this course to always support the latest node features.
So as you move through the class I recommend installing the newest version of node possible once again
for me.
That's currently eleven point zero point zero.
So I'm going to go ahead and click that big green button that's going to download the installer.
And it's one of those really easy click Next installers.
So let's go ahead and run through it right here.
There's no need to customize anything we see we'll click continue a couple of times we'll agree to some
stuff we're not going to read and we'll choose where we want to install node from here.
All we have to do is authenticate.
I'm going to provide my password.
And after just a couple of seconds.
No J.S. will be installed on your machine and there we go.
The note installer is all done.
It says that node was successfully installed and all we're going to do is test that by running a single
command from the terminal on your machine.
We're going to make sure that node was indeed wired up correctly to do that.
Let's go ahead and first close down the installer.
We're all done with this.
I am going to go ahead and move it to the trash.
It is no longer necessary.
And what we're going to do now is open up the terminal on our machines on my Mac.
I'm gonna get that done by cracking open spotlight and searching for the terminal applications.
If you're on Windows you can use the Windows key to bring up the search bar and search for the command
prompt application.
If you're on Linux the exact name and location is going to depend on your distribution you're looking
for something like the terminal the command prompt or the command line.
Now we're going to go ahead and crack this open and what we get regardless of our OS is the same thing.
Stylistically it's going to look a little bit different but it is a place for us to type commands.
We can then hit enter to run those commands and we'll see the results right here in this screen.
Now when we installed node j s we didn't get a gooey application with fields and buttons and taxed instead
what we got as a command.
We can now run from the command prompt.
We're going to be using this command hundreds of times throughout the course and we'll learn a lot more
about it and how it works throughout the class.
For now though we're going to use it in one way to check for the node version installed.
So right here we're gonna type out what seven characters to start we will run the node command.
So we're gonna type out node and oh d e followed by a space and we're going to provide a argument to
this command telling it that we just want to know the version of node that's running.
So right here after that space it is a hyphen followed by the letter V.
Now if we go ahead and run this we are going to get the version of node we just installed right here
I'm seeing version eleven point zero point zero which is indeed the version I installed a few minutes
ago right here.
You might not see the same version I have but you should see the same version you just installed.
Now what if you're not getting that.
Well if you're not getting a version that likely means node wasn't installed correctly and to simulate
what this looks like I'm just going to miss type node so I'll type node with two E's as an example.
Then I'll try to use this the argument to ask for the version but there is no node command with two
E's So what do I get.
I get an error saying something like command not found if you're seeing something like this when you
run the correctly spelled command and that means that node wasn't installed correctly and that we need
to address that before you can continue on to do that.
All you have to do is crack open a question in the course Q and A and I'll work with you to get node
installed correctly.
So at this point we've installed node j s and we've confirmed that we can actually use it on our machines
and that's where we're going to stop with the terminal for now I'm going to leave the terminal open
as we'll be using it in the next several videos.
And if you don't have any previous terminal experience don't worry we'll cover all of the commands we
end up running no terminal experience required.
That's all we're going to do with node 4 now to wrap up the video I want to make sure we all have a
text editor we can use to write out our node scripts.
So to do that let's go ahead and explore a couple of different options throughout this class.
I'll be using Visual Studio code.
You can find and install this over at code dot Visual Studio dot com.
Now there are a few reasons I love Visual Studio code.
It is free it is open source and it's available for all operating systems whether you're running on
Mac Windows or Linux.
It also has one of the best EDS I've used in a while with a fantastic ecosystem of extensions and themes
allowing you to really customize the editor to fit your needs.
And we're going to do just that with node j s with Visual Studio code.
We can actually debug no J.S. Right inside of the tool which is a great feature.
You don't always see from text editors.
Now there is no reason you have to use visual studio code.
It is just the editor.
I'll be using throughout the class.
You're more than welcome to use any editor you're comfortable with if you already have one that supports
javascript and you're already good to go.
But if you're looking for something new and you want to try out what is a very cool tool I definitely
recommend checking out visual studio code.
Now there are plenty of other options out there as well.
In the past I've used the atom text editor in my classes.
It's also a great free open source editor available for all operating systems and there are some good
paid editors out there as well.
Examples of that would be sublime text 3 and web storm.
Now web storm is definitely more of an IED e than a text editor but it's also a tool worth checking
out.
So all we need is to install one of these if you want to follow along exactly and use these setup I
use.
I recommend installing visual studio code.
So take a moment to get that done.
You can pause the video then come back when you have it installed and we're going to wrap up the course
by just cracking it open.
So I'm going to open up from Spotlight visual studio code and right here we're not going to actually
do anything with the editor.
I just want to make sure we have it installed and we can actually crack it open.
So we have node installed.
We've checked that the command works and we have a text editor where we can now write node scripts.
That is it for this installation video.
We're now ready to continue with the rest of the course in the next two videos.
As I mentioned we're going to focus on answering two important questions.
What is no J S and why is no JSA a tool worth using.
I'm excited to talk about both of those.
So let's go ahead and jump right in to the next one.