Skip to content

ym496/web-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minimal http server in java

This is a lightweight multi-threaded HTTP server built from scratch using Java. It can handle GET, POST, and other HTTP requests asynchronously. It supports HTTP methods and serves files from a specified directory. It can process multiple requests at the same time by leveraging Java’s threading mechanism. I created this to understand how HTTP servers work.

demo

  • serves files with different MIME type from a specified dir
web server demo
  • http method POST example
web server demo
  • this server uses Java threads to handle client requests concurrently. Each client request is processed in its own thread, ensuring non-blocking, simultaneous processing of multiple requests.

Installation

  1. Clone this repo:
    git clone git@github.com:ym496/web-server.git
    cd web-server
  2. Compile the server:
    javac Server.java
  3. Run the server:
    java Server

License

This project is licensed under the MIT License.

About

A minimal multi-threaded http server from scratch in java.

Topics

Resources

License

Stars

Watchers

Forks