I heard that an HTTP server “listens on port 80”, but then if make an Express app, they make it “listen on port 3000” (in their Hello World example).
What exactly does it mean to “listen on a port”?
Why does this default Express app listen on port 3000 instead of port 80?
a2937
2
Listening on a port means what it sounds like. The application is now waiting for an incoming connection on a port.
Ports 80 and 443 are the default HTTP and HTTPS ports but they require additional permissions.
Using port 3000 is also a great reminder to use a proxy that would then listen on port 80/443
system
Closed
3
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.