This documentation provides instructions on installing, using, testing, and deploying the project.
To install the C++ HTTP Server, follow these steps:
-
Ensure that you have the following prerequisites installed:
- C++ compiler (GCC or Clang)
- Boost library (version 1.70 or higher)
- CMake (version 3.10 or higher)
-
Clone the project repository from GitHub:
git clone https://github.com/Thavarshan/chttp.git
- Navigate to the project directory:
cd chttp
- Create a build directory:
mkdir build
cd build
- Generate the build files using CMake:
cmake ..
- Compile the project:
make
Upon successful completion of these steps, the compiled server
binary will be generated in the build
directory.
To use the HTTPServer, follow these steps:
- Ensure that the server is compiled by following the installation instructions.
- Open a terminal or command prompt.
- Navigate to the
build
directory:
cd chttp/build
- Start the server by running the
server
binary:
./server
- The server will start listening on port 8080 by default. You can modify the port number by passing it as a command-line argument:
./server <port>
- Once the server is running, it will start accepting incoming HTTP requests.
To run the test cases for the HTTP Server, follow these steps:
- Ensure that the server is compiled by following the installation instructions.
- Open a terminal or command prompt.
- Navigate to the
build
directory:
cd chttp/build
- Run the
server_test
binary to execute the test cases:
./server_test
- The test cases will be executed, and the test results will be displayed in the terminal.
- Verify that all the test cases pass without any failures or errors.
To deploy the HTTPServer project, follow these steps:
- Compile the server by following the installation instructions.
- Transfer the compiled
server
binary to the target deployment environment. - On the target deployment environment, open a terminal or command prompt.
- Navigate to the directory where the
server
binary is located. - Start the server by running the
server
binary:
./server
- The server will start listening on the default port 8080. If needed, you can modify the port by passing it as a command-line argument:
./server <port>
- Ensure that the necessary network configurations, such as firewalls and port forwarding, are in place to allow incoming connections to the server.
- Once deployed, the server will be ready to accept incoming