This project is a simple HTTP server application written in C++ that demonstrates handling HTTP requests for managing Person entities using the Boost ASIO and Beast libraries. It showcases RESTful API design principles, implementing endpoints to retrieve and create person entities.
- RESTful API to manage person entities.
- Uses Boost libraries for network and HTTP functionalities.
- Demonstrates clean architecture, dependency injection, and SOLID principles.
- Simple CMake setup for easy building and configuration.
- e2e tests in Python.
- Powerful router.
Before you begin, ensure you have met the following requirements:
- C++20 compatible compiler (GCC, Clang, MSVC, etc.)
- CMake version 3.14 or higher
- Boost libraries, version 1.71.0 or higher
- Clone the repository:
git clone https://github.com/araujo88/MiniBoostRestAPI.git
cd MiniBoostRestAPI- Configure the project with CMake:
mkdir build && cd build
cmake ..- Build the project:
cmake --build .This will generate an executable file in the build directory.
After building the project, you can run the server with the following command from the build directory:
./MiniBoostRestAPI # or MiniBoostRestAPI.exe on WindowsBy default, the server listens on port 6969. You can interact with the server using any HTTP client, such as curl or Postman, targeting the available endpoints.
GET /person: Retrieves a list of all person entities.POST /person: Creates a new person entity.GET /person/{id}: Retrieve a person entity by id.DELETE /person/{id}: Delete a person entity by id.
This project is licensed under the MIT License - see the LICENSE file in the repository for details.