/static-server

One of the tasks in Mail.ru training course for system architect (2016)

Primary LanguageC++MIT LicenseMIT

HTTP Static Server Build Status

HTTP Static server on boost::asio and coroutines.

Requirements

Usage

Build using cmake

  1. Clone and build the server
    git clone https://github.com/ed-asriyan/static-server
    cd static-server
    cmake CMakeLists.txt
    make
  2. Run the server
    ./static_server <PORT> <ROOT_DIRECTORY>
  3. Then stop it by Ctrl-C

Run using Docker

  1. Create an image
    git clone https://github.com/ed-asriyan/static-server
    cd static-server
    docker build -t static_server .
  2. Create a container
    docker run -d --name static_server -p <PORT>:80 -v <ROOT_DIRECTORY>:/static static_server
  3. Run the server
    docker start static_server
  4. Then stop it by the folowing command
    docker stop static_server