Garvan C++
A fast and easy-to-use C++ web framework. Garvan extends Crow with an ORM, migrations, a model/controller/service tier, and a command-line toolbox — so you can ship HTTP and WebSocket services without leaving C++.
Blazingly fast
Built on Crow's high-performance core — routing is a compile-time decision tree.
Multi-database
First-class drivers for PostgreSQL, MySQL, SQLite, MongoDB and MonetDB.
Batteries included
Mustache templates, JSON, query builder, migrations, logger — out of the box.
WebSockets
Real-time bidirectional communication with the same routing model as HTTP.
Get up and running in 8 lines
Define a route, return a string, run the app. Garvan stays out of your way.
#include "crow.h"
int main()
{
crow::SimpleApp app;
CROW_ROUTE(app, "/")([]{
return "Hello from Garvan!";
});
app.port(9090).multithreaded().run();
}
CROW_ROUTE(app, "/api/users/<int>")
([](int id) {
crow::json::wvalue user;
user["id"] = id;
user["name"] = "Ada";
user["email"] = "ada@example.com";
return user;
});
JSON, the easy way
Return a crow::json::wvalue from a handler and Garvan will set the right
Content-Type for you. Garvan's own JsonValue wraps the same
primitives for use inside services and models.
An ORM that feels familiar
A fluent query builder writes the SQL for any of the supported backends. Models
extend OModel and expose find(), where() and
relations.
auto users = db.table("users")
.where("active", "=", 1)
.order_by("created_at", "desc")
.limit(20)
.get();
Install Garvan
Learn Garvan
Start with the setup guide, then build your first endpoint.