Skip to content
Example project how-to use oatpp-consul integration module.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
main updated to oatpp veraion 0.19.4 Apr 29, 2019
.dockerignore project moved from oatpp-examples repo Jan 30, 2019
.gitignore project moved from oatpp-examples repo Jan 30, 2019
CMakeLists.txt
Dockerfile project moved from oatpp-examples repo Jan 30, 2019
LICENSE Initial commit Jan 30, 2019
README.md Update README.md Jan 30, 2019
azure-pipelines.yml project moved from oatpp-examples repo Jan 30, 2019

README.md

Consul Integration Example Build Status

Example project how-to use oatpp-consul module.

More about oat++:

Overview

This project is using oatpp and oatpp-consul modules.

Currently this is trivial example.- Read/Write from/to Consul KV via endpoints declared in Controller. More complex example later.

In this example Consul is expected to run at port 8500.

Project layout


- CMakeLists.txt               // project loader script. load and build dependencies 
- main/                        // main project directory
    |
    |- CMakeLists.txt          // projects CMakeLists.txt
    |- src/                    // source folder
    |- test/                   // test folder
    
- src/
    |
    |- controller/              // Folder containing controller where all endpoints are declared
    |- dto/                     // DTOs are declared here
    |- AppComponent.hpp         // Service config
    |- Logger.hpp               // Application Logger
    |- App.cpp                  // main() is here
    

Build and Run

Using CMake

$ mkdir build && cd build
$ cmake ..
$ make run        ## Download, build, and install all dependencies. Run project

In Docker

$ docker build -t example-consul .
$ docker run -p 8000:8000 -t example-consul
You can’t perform that action at this time.