Node.js Tutorials
Lección 1 de 14 · Node.js Part 1 - Install NodeJS on Windows · Tecnología de la información
Sobre este curso
hey guys welcome to my no das series I'm not really sure where I'm going to go with this series yet I'm just kind of winging it kind of just going just
moving along so but what I want to do in this video is install nodejs and we're going to install it on Windows most of the videos that you've seen probably the probably using Linux or a Mac but we're
going to use Windows just because things run a little different and I know some of you might not know might not use Linux or Mac so we're going to install nodejs but first I want to install get
for Windows and there's two reasons I want to install this one obviously is for version control so we have that accessible on our Windows machine and I also like the terminal that it gives us
it allows us to do Linux like commands and just just different things so that's what we'll be using basically as our terminal when we use node so you want to go to get – SCM comm and click download
for Windows and actually already have a video of this if you want to check that out – I already downloaded it so I'm going to go to that my downloads folder and we want to install get
all right so I'm just going to use I'm just going to use the default directory for the components I'm going to just leave yeah we're just going to leave it as
default all right now here I actually want to change this from using git bash only because I want to be able to do get and other Linux like commands within the regular command prompt so I'm going to
choose this option where I get and include UNIX tools from the windows command prompt and for this option check out Windows style we'll just leave this as the fall
all right so you might get a security alert you just want to allow access that's just the windows firewall I apologize if anything runs slow this is actually a virtual machine that
doesn't have that much power so all right so that's finished now you usually would get an icon here but I guess we didn't now this program comes with a GUI as well the get GUI so you
can actually have an interface with icons and stuff I have actually never used it I basically just want this for the command line you can check out the GUI if you want but I'm going to take
this git bash and send it to my desktop that way we can easily access that all right and if we open that up it's basically just a command prompt all right so now what we want to do is
install node so you want to go to node J s org and click install and it should automatically give you the right file to install depending on your system all right so we want to open that
Oh all right so this is just going to install note on your system just click all the defaults all right so Note has been successfully
installed and if we go to all programs no js' we can send this to the desktop all right now if we click on nodejs we get this coming in line and what this is
is it's called repl which stands for read eval print loop and it's basically the command-line interface that we can use to interact with node and we can write JavaScript and among other things
but we're not going to be using this too much because we can actually just access it from our command line we could access it from the standard Windows command line as well as this get bash all right
in the all we have to do to access it is just type in node and then it gives us that same greater than sign and we can do some stuff here all right so let's just do a couple simple things we can
basically run JavaScript in the command line all right so we can assign variables we'll say variable Y which gives us it instantiates a variable for us we can say y equals 4 and it'll give
us 4 back if we say variable x equals 5 we get undefined and it's just not returning us anything it's just assigning the variable and this happens if we use the VAR keyword and I'm not
I'm not a hundred percent sure why it does that but it just does but either way you're still assigning the variable we can do basic math so we can say X plus y which will give us nine we can
increment so X is now six we can do stuff with strings will say variable color is equal to red and you want to make sure you use quotes just like you would in any
JavaScript alright and we can do strings we can print stuff out with console dot log alright so in here we'll say my favorite color is and then we can concatenate on our variable okay so it
says my favorite color is red and this console dot log you may have seen before you may have used it in chrome tools nodejs actually runs on the same JavaScript
engine that Chrome runs on which is the the v8 JavaScript engine and that's it's really fast and that's one of the reasons why note is so quick so that's a basic installation like I said I'm just
kind of winging it for this series so I know in the next video I want to start getting into writing scripts that we can access in the browser we'll write a small web server program with node you
actually have to write the web server yourself you have to send out the request and response it's not like something like PHP where you just install it onto a server no it actually
is the server alright so it's actually kind of cool so we'll get into that and I'm also going to I'm going to be using Express which is an MVC framework for node it's a node
module so we'll get into that as well and we'll do some other cool stuff as well