Swiftorial Logo
Home
Swift Lessons
AI Tools
Learn More
Career
Resources

Node.js FAQ: Top Questions

10. What is the http module in Node.js?

The http module is a built-in Node.js module for creating HTTP servers and clients, enabling web server functionality without external frameworks.

  • Server: Created with http.createServer .
  • Client: Make requests with http.request or http.get .
  • Request/Response: Handles req (request) and res (response) objects.
  • Use Case: Building lightweight web servers or APIs.