Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Quality Gate Status

Table of Contents

About The Project

A multi-threaded file-based web server. The server supports only GET (read) operations.

Built With

Getting Started

Prerequisites

  1. Installed Java 8
  2. Installed Maven (tested with version 3.6.1)

Installation

Execute following command to compile and run the program: mvn clean package exec:java. The server runs on 65535 port and resources from /src/test/resources directory will be exposed.

Testing

Unit tests are run as part of build process.

Integration tests might be called with mvn test -Dtest=ServerTest command. For testing purposes default server configuration exposes a demo page downloaded from: https://colorlib.com/preview/theme/atomic/

Usage

The server supports GET requests only.

  • When existing resource is requested then the file is returned by the server with 200 status code
  • When existing directory is requested and the directory contains index.html file then the file is returned with 200 status code
  • When existing directory is requested but it doesn't contain index.html file then 403 status code is returned
  • When nonexisting resource is requested then 404 status code is returned

In case of other requests 501 NOT IMPLEMENTED response is returned.

Run Parameters

  • -d <arg> - allows to specify server root directory. Default value: .
  • -p <arg> - HTTP port number to run the server. Default value: 65535
  • -t <arg> - number of threads used by server incoming requests. Default value: 20

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages