Template of a C++ service that uses userver framework. Build, test and CI scripts ready
Template of a C++ service that uses userver framework.
To create your own userver-based service follow the following steps:
git clone your-service-repo && cd your-service-repo && git submodule update --init
Makefile contains typicaly useful targets for development:
make build-debug
- debug build of the service with all the assertions and sanitizers enabledmake build-release
- release build of the service with LTOmake test-debug
- does a make build-debug
and runs all the tests on the resultmake test-release
- does a make build-release
and runs all the tests on the resultmake service-start-debug
- builds the service in debug mode and starts itmake service-start-release
- builds the service in release mode and starts itmake
or make all
- builds and runs all the tests in release and debug modesmake format
- autoformat all the C++ and Python sourcesmake clean-
- cleans the object filesmake dist-clean
- clean all, including the CMake cached configurationsmake install
- does a make build-release
and run install in directory set in environment PREFIX
make install-debug
- does a make build-debug
and runs install in directory set in environment PREFIX
make docker-COMMAND
- run make COMMAND
in docker environmentmake docker-build-debug
- debug build of the service with all the assertions and sanitizers enabled in docker environmentmake docker-test-debug
- does a make build-debug
and runs all the tests on the result in docker environmentmake docker-start-service-release
- does a make install-release
and runs service in docker environmentmake docker-start-service-debug
- does a make install-debug
and runs service in docker environmentmake docker-clean-data
- stop docker containersEdit Makefile.local
to change the default configuration and build options.
The original template is distributed under the Apache-2.0 License and CLA. Services based on the template may change the license and CLA.