This project is for practicing C, and how to make an HTTP Server from scratch
- Clone the repo
- Make sure you have CMake installed, on Ubuntu run the following:
sudo apt install cmake
- Make sure you have CMake installed, on Mac run the following:
brew install cmake
This project uses gcc, it hasn't tested on any other compiler
Run on your terminal the following:
chmod +x build.sh
and finally to build and run the server
./build.sh -r
if you only want to build without running;
./build.sh
You'll be received with the following:
-
Add dynamic memory allocation on request body buffer.
-
Add json parser.
-
Mounts a server onto a selected port via sockets.
-
Can return all HTTP status codes and definitions defined on HTTP 1.1.
-
Responds with buffer.
-
Dynamic routing
-
Matches the requested path with a defined path.
-
Allows for query and url parameters.
-
Easy route definition with function handlers and HTTP methods.