Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌐 Simple HTTP Server in Java

This is a minimal HTTP server written in pure Java using ServerSocket. It's a great project for understanding the fundamentals of networking, HTTP, and how server-client communication works.

When you run this program, it opens port 8080 and responds with the current date and time whenever a client (like a browser or Telnet) connects.


πŸš€ Features

  • βœ… Built with pure Java (no external libraries)
  • πŸ“‘ Listens on port 8080
  • πŸ“… Responds with the current server date and time
  • πŸ” Handles multiple client connections (looped)
  • 🧠 Simple and educational

πŸ“¦ How to Run

git clone https://github.com/FaroukAzizi-dev/Simple-java-http-Server.git
cd simple-http-server-java

### 2. Compile the Java file

javac SimpleHTTPServer.java

### 3. Run the server

java SimpleHTTPServer

🌐 How to Test

πŸ“ Option 1: Use a web browser

http://localhost:8080

πŸ’» Option 2: Use Telnet (if installed)

telnet localhost 8080
Then type this and press Enter twice:

GET / HTTP/1.1
Host: localhost


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages