https://github.com/dmtai/currexch_service
HTTP-service on boost::asio and postgres
https://github.com/dmtai/currexch_service
asio beast boost boost-asio boost-beast cmake cpp cpp20 example-project http libcuckoo ozo plpgsql postgresql pytest server
Last synced: 3 months ago
JSON representation
HTTP-service on boost::asio and postgres
- Host: GitHub
- URL: https://github.com/dmtai/currexch_service
- Owner: dmtai
- License: mit
- Created: 2023-12-19T16:02:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-26T15:36:36.000Z (over 2 years ago)
- Last Synced: 2025-02-26T08:31:20.511Z (over 1 year ago)
- Topics: asio, beast, boost, boost-asio, boost-beast, cmake, cpp, cpp20, example-project, http, libcuckoo, ozo, plpgsql, postgresql, pytest, server
- Language: C++
- Homepage:
- Size: 115 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A toy service for currency exchange. For create the service, an engine was developed. The engine consists of a http-server(http-parsing(on boost::beast), routing, async request handling, http-handlers, http-filters) on boost::asio and utilities(async work with postgres(on ozo lib), caches, logging, configs).
### Build and run
```
git clone --recurse-submodule https://github.com/dmtai/currexch_service.git
cd currexch_service
# Run the service with docker-compose
make docker-run
```
To build and run the service locally, you need to run Postgres and create the database using a script db/curr_exchange.sql. Set connection_info in ./configs/config.yaml. Next you need to install the сonan package manager(1.60). Then use it to install dependencies(see Makefile with helping commands). After that, build the project(using cmake) and start the service.
```
git clone --recurse-submodule https://github.com/dmtai/currexch_service.git
cd currexch_service
# Install dependencies
make conan-install-debug
make build-debug
# Run the service
build_debug/currexch_service --config configs/config.yaml
```