Back to case studies
Node.jsFundamental

Creating an HTTP server with Node.js built-in http module

Scenario

Context A team needs a lightweight HTTP server to serve a simple health check endpoint for a microservice. The Problem The team is not familiar with Node.js and has been using a full Express setup for a server that only needs one route. Constraints Use only the built-in http module, no external packages. Respond with a JSON body on GET /health. Return a 404 status for all other routes. Expected Deliverable A Node.js HTTP server using the built-in http module, handling a health check endpoint and returning appropriate status codes.

Targeted skills

nodejshttpserverbuilt-inrouting
    Creating an HTTP server with Node.js built-in http module — Node.js hands-on scenario | CodeDuel