https://github.com/stiffstream/restinio-conan-example-boost-asio
An example of RESTinio usage via Conan package (with Boost.Asio instead of standalone Asio).
https://github.com/stiffstream/restinio-conan-example-boost-asio
Last synced: 5 months ago
JSON representation
An example of RESTinio usage via Conan package (with Boost.Asio instead of standalone Asio).
- Host: GitHub
- URL: https://github.com/stiffstream/restinio-conan-example-boost-asio
- Owner: Stiffstream
- License: bsd-3-clause
- Created: 2018-11-22T12:05:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-15T06:25:08.000Z (about 7 years ago)
- Last Synced: 2025-05-19T14:52:25.821Z (about 1 year ago)
- Language: Dockerfile
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This repository contains a simple example that use [RESTinio](https://stiffstream.com/en/products/restinio.html) via the corresponding Conan package.
RESTinio uses Boost.Asio. To see the same example but with usage of standalone version of Asio look at [that repo](https://github.com/Stiffstream/restinio-conan-example).
# How To Try
## Docker
The simplest way is to use Docker and Dockerfile from the repository. For example:
```bash
git clone https://github.com/Stiffstream/restinio-conan-example-boost-asio
cd restinio-conan-example-boost-asio
docker build -t restinio-conan-example-boost .
docker run -p 8080:8080 restinio-conan-example-boost &
curl http://localhost:8080/
```
All necessary steps like installing Python, PIP, conan, CMake and so on are performed in Dockerfile. You can inspect Dockerfile content to see how conan can be configured and used.
## Manual Build
To perform manual build it is necessary to have conan and CMake installed. Then you can do the following steps:
```bash
# Add remote for conan to find RESTinio package.
conan remote add stiffstream https://api.bintray.com/conan/stiffstream/public
# Add remote for conan to find RESTinio's dependencies.
conan remote add public-conan https://api.bintray.com/conan/bincrafters/public-conan
# Clone the demo repository.
git clone https://github.com/Stiffstream/restinio-conan-example-boost-asio
cd restinio-conan-example-asio
# Build the example.
mkdir build && cd build
conan install .. --build=missing
cmake ..
cmake --build . --config Release
# Check the example.
./bin/hello_world_minimal &
curl http://localhost:8080/
```