Skip to content

Commit

Permalink
update to the latest oatpp API version.
Browse files Browse the repository at this point in the history
  • Loading branch information
lganzzzo committed Oct 25, 2021
1 parent b00a1ba commit c5c7bfd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ add_library(${project_name}-lib

## link libs

find_package(oatpp 1.2.5 REQUIRED)
find_package(oatpp-consul 1.2.5 REQUIRED)
find_package(oatpp 1.3.0 REQUIRED)
find_package(oatpp-consul 1.3.0 REQUIRED)

target_link_libraries(${project_name}-lib
PUBLIC oatpp::oatpp
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
# https://aka.ms/yaml

jobs:
- job: ubuntu_16_04
displayName: 'Build - Ubuntu 16.04'
- job: ubuntu_20_04
displayName: 'Build - Ubuntu 20.04'
continueOnError: false
pool:
vmImage: 'Ubuntu 16.04'
vmImage: 'ubuntu-20.04'
container:
image: lganzzzo/ubuntu-cmake:latest
workspace:
Expand Down
11 changes: 3 additions & 8 deletions src/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,12 @@ void run() {
AppComponent components; // Create scope Environment components

/* create ApiControllers and add endpoints to router */

auto router = components.httpRouter.getObject();

auto DemoController = DemoController::createShared();
DemoController->addEndpointsToRouter(router);

auto healthController = HealthController::createShared();
healthController->addEndpointsToRouter(router);

router->addController(DemoController::createShared());
router->addController(HealthController::createShared());

/* create server */

oatpp::network::Server server(components.serverConnectionProvider.getObject(),
components.serverConnectionHandler.getObject());

Expand Down

0 comments on commit c5c7bfd

Please # to comment.