- /
- node/
HTTP Server Overview
Serving Content Over The Web
What Is A Server
A Server is a computer. When it comes to the internet, there are "web servers". "web servers" are computers (servers) that...
- have http* server tooling (like node's built-in http module) which...
- listening for requests over the http protocol
- responds to requests (typically from a browser or http client) and sends to the requester some data
When going to a browser (google chrome, safari, firefox, opera, edge, brave, etc) and typing in a url www.google.com, the browser is making a request to the internet which eventually makes it to a server where the google website is served by a server.
sequenceDiagram
participant Browser
Browser->>Web Server: REQUEST <br/> Hey web server, can I view this website?
loop Handling the Request
Web Server->>Web Server: - Receive Request <br/> - Use a "handler" <br/> - Prepare The Response
end
Web Server-->>Browser: RESPONSE: Here's what you asked for!
*Notes
- http could also leverage http/2 and/or https
- for code examples of the http server, see these trivial examples to get started
Page Tags:
http
web
server
node
express