+ 1

Hi, I'm new to programming and I just started Node js. I'm wondering what r ports and hosts and why do we need to set them up?

I'm using the lesson on Sololearn, if anyone knows of a more idiot proof resource to learn Node JS can share:)

24th Jan 2020, 10:20 AM
Lim Yee Wee
Lim Yee Wee - avatar
7 ответов
+ 5
Ok think about a house where your family theAdvisors lives in. Each member has an own postbox. You are the one for cake receipts and you always have an eye on ur postbox which might be 5555. What would someone do if he wants a receipt from u? He would address a request to theAdvisors port 5555. Your family is a local network and you are the program listening to port 5555. other members of ur family will serve files, accept Minecraft requests or html pages. Each one has a port listening to and answering for a request. and if u are on holidays or ftp server is down...Error 404.
24th Jan 2020, 3:36 PM
Oma Falk
Oma Falk - avatar
+ 1
因為那是伺服器語言 Node.js is a server side language, when you first learn it, the lessons will teach you to host it on your own computer. There are many ports on your computer, some are hardware ports, such as USB ports. There are also virtual ports, such as 8080 for http.
24th Jan 2020, 10:25 AM
Gordon
Gordon - avatar
+ 1
Listening......
24th Jan 2020, 11:43 AM
mlq002
mlq002 - avatar
0
I see... Am I right to say that hosting means to run the code such that it provides information for the software to work? And ports are imaginary places where hosting takes place?
24th Jan 2020, 10:32 AM
Lim Yee Wee
Lim Yee Wee - avatar
0
Also is it important to understand these terms well or can I just move on with little understanding?
24th Jan 2020, 10:33 AM
Lim Yee Wee
Lim Yee Wee - avatar
0
?
24th Jan 2020, 11:44 AM
Lim Yee Wee
Lim Yee Wee - avatar
0
@Oma Falk thks so much! That's rlly helpful:)
28th Jan 2020, 11:57 PM
Lim Yee Wee
Lim Yee Wee - avatar