This course has been updated! We now recommend you take the Full Stack for Front-End Engineers, v2 course.
Transcript from the "Starting the server" Lesson
>> Jem Young: All right≤ so let's go ahead and start our server up. So node app js. So I will do that as well. So node, cool. And it's listening on port 3001, that's just what I've configured it to. So If I go to jem.party, aah, it still doesn't work.
[00:00:20] But if we go to port 3001, we should get our web page. We are now hitting our Node server. Everybody here with me so far? Awesome, so what's the problem with this? You can't make a web site, and it's like, jem.party port 3001. Then someone would be like, how do you do a port in a URL?
[00:00:40] That's dumb. No, so what we want is port 80 to redirect to port 3001 on our local machine. So how do we do that? This is where we're gonna use NGINX. So, as of right now, I don't actually need NGINX. If I want to serve my Node server just out of port 80, I change 3001 to port 80, that would work too.
[00:00:59] It would connect directly to my Node application, but we don't wanna do that. We wanna leave NGINX as the server that sits between, so that I can free up the rest of my port. Since Port 80 is a very valuable port and you don't generally wanna serve files directly from a server.
[00:01:14] It leaves you open to all sorts of attacks. So right now we're gonna configure our NGINX to point jem.party directly to our Node server. This is where it gets fun if you weren't having fun before.