Skip to content

Small C++ backend template with CMake as build system, vcpkg as dependency manager, Crow as web framework and Docker support

License

Notifications You must be signed in to change notification settings

landiluigi746/cpp-backend-template

Repository files navigation

cpp-backend-template

This is a small C++ backend template that uses CMake as build system, vcpkg as dependency manager, Crow as web framework and features Docker and Docker compose support. It also provides already defined Microsoft-like formatting options with clang-format.

Dependencies

To use this template you need:

  • a C++ compiler (C++23 is used by default, edit CMake config if you want to use a different standard)
  • CMake (3.14.0 >=)
  • vcpkg
  • Docker
  • clang-format (optional, used to format code)

Getting started

To get started with this template, either clone it or generate a new repo from this one. Then, create a .env file with env variables. Example:

PORT=8000
BUILD_TYPE=Release # options are Debug, Release, RelWithDebInfo and MinSizeRel 

Finally, start the docker container with docker compose:

docker compose up --build -d

About

Small C++ backend template with CMake as build system, vcpkg as dependency manager, Crow as web framework and Docker support

Topics

Resources

License

Stars

Watchers

Forks