Node's Own Web Server
Node's Own Web Server: A Web Server with Node's http Module, Routing by Hand, and Why Frameworks Exist.
Updated
- A Web Server with Node's http Module (Apprentice): Node's own http module starts a web server that keeps running and calls your function once for every request, which reads req.method and req.url and answers with res.writeHead and res.end.
- Routing by Hand, and Why Frameworks Exist (Apprentice): A node:http server routes each request with if statements on its method and path, reads a JSON body that arrives in pieces, and grows a little with every address, which is the work a framework such as Express takes over.