/cpp-boostasio-webserver-adapter

Implementation of C++ Web Server based on Boost Asio

Primary LanguageC++

Build Status Build status codecov Codacy Badge

C++ Web Server Adapter implementation for Boost Asio

This repository implements the interface for the C++ Web Server Adapter using Boost Asio.

Setup

Download using Conan

This library is designed to be installed by making use of Conan package manager. So, you just need to add the following requirement into your Conan recipe:

def requirements(self):
   self.requires("BoostAsioWebServerAdapter/1.0.0@systelab/stable")

Version number of this code snipped is set just as an example. Replace it for the desired package version to retrieve.

As this package is not available on the conan-center, you will also need to configure a remote repository before installing dependencies:

conan remote add systelab-public https://csw.jfrog.io/artifactory/api/conan/cpp-conan-production-local

See Conan documentation for further details on how to integrate this package with your build system.

Build from sources

See BUILD.md document for details.

Usage

Initialize this library by creating an instance of the systelab::web_server::boostasio::ServerFactory class:

#include "BoostAsioWebServerAdapter/ServerFactory.h"

std::unique_ptr<systelab::web_server::IServerFactory> serverFactory = 
    std::make_unique<systelab::web_server::boostasio::ServerFactory>();

Use the systelab::web_server::IServerFactory interface of the created object to access to the web server features as described on C++ Web Server Adapter documentation.