Skip to content

A simple HTTP server built using Node.js core modules. It handles basic routing, parses incoming requests, sets custom headers and status codes, and runs on a configurable port — all without using any external libraries. Ideal for understanding how Node.js works under the hood for backend development.

Notifications You must be signed in to change notification settings

neha-dev-dot/HTTP-SERVER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

📡 Node.js Basic HTTP Server

A lightweight and beginner-friendly HTTP server built using Node.js. This project is a foundational setup for building APIs, handling HTTP requests, and learning core backend development.


🚀 Features

🔌 Handles basic HTTP requests
🌐 Returns plain text or HTML responses
🧱 Minimal and extensible structure
🔁 Ready for route and middleware expansion


📁 Project Structure

node-http-server/

  • server.js # Main server logic
  • ackage.json # Node.js metadata and dependencies
  • README.md # Project documentation

🛠️ Installation & Setup

# Clone the repository
git clone https://github.com/neha-dev-dot/node-http-server.git
cd node-http-server

Initialize project

npm install

Run the server

node server.js

📟 Sample Response

Once the server is running, go to your browser or use curl:

http://localhost:3000/

🐛 Known Issues

Only supports a single route by default (/)

No error-handling middleware yet

Static file serving not yet implemented

🧠 Learnings

This project helps you: 📘 Understand how Node.js handles HTTP natively 📘 Work with http.createServer() 📘 Prepare for using Express.js or other frameworks

🙌 Contributing

Contributions are welcome! Please fork the repo and submit a pull request.

About

A simple HTTP server built using Node.js core modules. It handles basic routing, parses incoming requests, sets custom headers and status codes, and runs on a configurable port — all without using any external libraries. Ideal for understanding how Node.js works under the hood for backend development.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors 2

  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy