Skip to content

daniancu/httpserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Java HTTP Server

This project contains the first development iteration of a Java HTTP Server.
Its is not a full webserver implementation as this will require much more time. Rather, it defines an initial architecture and implements some basic web server functions: GET, HEAD, PUT, DELETE, OPTIONS methods It supports HTTP 1.1. Connection keep-alive is not supported.

The project architecture has 3 main layers, each layer's components being stored in a separate Java package

websiteapi - contains the core API that manages the website (it exposes basic CRUD APIs for resource management)

httpapi - contains APIs to run a HTTP server and handle HTTP requests for website resources

serverapp - a sample HTTP server application and it's configuration for demo purposes. It runs by default on port 8001 and exposes an embedded website

The layer dependency can be seen below: (outer layers depend on inner layers with the core having no dependencies like in an Onion style architecture)

serverapp --> httpapi --> websiteapi
    |________________________^

Software dependencies:

  • Java 8 SDK
  • Project Lombok library to generate logging and getter/setters
  • JUnit 4 for unit testing
  • Apache Maven 3 to build and run the server

To start the server use Maven command:

mvn clean install exec:java

Then point your browser to localhost:8001/

Note: The server was tested on Windows and Linux, MacOS behavior is not tested

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published