moneroexamples / cpphttp

Example setup of C++ http server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example of C++ http server

Example setup and use of drogon to provide json http rest server.

Project download and compilation on Ubuntu 18.04

# go to home folder
cd ~

# drogon dependencies
sudo apt install libjsoncpp-dev uuid-dev zlib1g-dev

# for Mac OS X using brew
brew install ossp-uuid jsoncpp zlib

git clone --recurse-submodules https://github.com/moneroexamples/cpphttp

cd cpphttp

mkdir build && cd build

cmake ..

make

Using docker

# go to home folder
cd ~

git clone --recurse-submodules https://github.com/moneroexamples/cpphttp

# build cpphttp docker image
docker build ./my-dev-repo/ -t "cpphttp"

# run the container (without saving)
docker run --rm  -ti -p 8080:8080 --name cpphttp cpphttp 

# test the cpphttp
curl -w '\n' localhost:8080

# kill the container
docker kill cpphttp

How can you help

Constructive criticism, code and website edits are always good. They can be made through github.

About

Example setup of C++ http server

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C++ 99.4%Language:CMake 0.3%Language:Shell 0.1%Language:Dockerfile 0.1%