Scaffold Drogon (C++) backend projects from ready-to-build templates.
Create a new project using npm:
npm create drogon-app@latestOr run via npx:
npx create-drogon-appIf your npm version requires -- to forward arguments:
npm create drogon-app@latest -- create my-service -t drogon-starterInteractive mode (no arguments):
create-drogon-appCreate a project (legacy positional form):
create-drogon-app my-serviceCreate a project (explicit subcommand):
create-drogon-app create my-serviceList templates:
create-drogon-app listHelp/version:
create-drogon-app --help
create-drogon-app --version-t, --template <template>: template ID (folder name undertemplates/)-y, --yes: skip prompts and use defaults when possible-f, --force: overwrite the target directory if it already exists
Examples:
create-drogon-app create my-service -t drogon-jwt-postgres-s3create-drogon-app create -y -t drogon-starterTemplate IDs are the folder names under templates/. If --template is not provided, the CLI uses the first template in alphabetical order.
| Template | Includes | Best for |
|---|---|---|
drogon-starter |
Drogon starter + PostgreSQL (Docker Compose) + GET /health sample route |
A clean baseline backend |
drogon-jwt-postgres |
PostgreSQL (Docker Compose) + JWT auth + GET /health |
Authenticated APIs |
drogon-jwt-postgres-s3 |
PostgreSQL (Docker Compose) + JWT auth + AWS S3 integration (AWS SDK) + local MinIO | Auth + object storage |
drogon-postgres-s3 |
PostgreSQL (Docker Compose) + AWS S3 integration (AWS SDK) + local MinIO | Object storage without JWT |
Each generated project includes its own README.md with template-specific setup commands.
For the generator:
- Node.js (recommended: active LTS)
- npm
For building/running the generated C++ project:
- C++17 toolchain (GCC/Clang)
- CMake >= 3.15
- Python 3 + pip
- Conan
- Docker (optional; templates use it for local services like PostgreSQL/MinIO)
The CLI creates the target folder (relative to your current working directory) and copies the selected template into it.
By default it excludes: .git, node_modules, build, dist, .cache.
See docs/CODEBASE.md.
MIT