litesrv

A simple HTTP server written in C++

litesrv, a simple HTTP Server

This is a simple HTTP server written in C++ using the Boost.Asio library.

Prerequisites

Make sure you have the following installed on your system:

  • C++ compiler (e.g., g++)
  • CMake
  • Boost library

On Ubuntu/Debian:

sudo apt-get install g++ cmake libboost-all-dev

On macOS using Homebrew:

brew install g++ cmake boost

Building the Project

  1. Clone the repository:
git clone https://github.com/jkup/litesrv.git
cd litesrv
  1. Create and navigate to the build directory:
mkdir build
cd build
  1. Run CMake to configure the project:
cmake ..
  1. Build the project:

Running the Server

After building the project, you can run the HTTP server:

./http_server

The server will start and listen on port 8080. You can test it by opening a web browser or using curl:

curl http://localhost:8080

You should see the response Hello, World!.

License

This project is licensed under the MIT License. See the LICENSE file for details.

This `README.md` provides a concise guide on how to set up the environment, build the project, and run the server.