🌱Light and powerful C++ web framework for highly scalable and resource-efficient web application. It's zero-dependency and easy-portable.
Oat++ is a modern Web Framework for C++.
It’s fully loaded and contains all necessary components for effective production level development.
It’s also light and has a small memory footprint.
1.3.0-latest
tag.1.4.0
.Maintaining and developing this project requires significant time and resources. If you enjoy using it and want to support its continued development, please consider supporting us through GitHub Sponsors.
Every contribution, big or small, helps us keep improving and maintaining the project.
Thank you for your support!
Shortcuts:
See ApiController for more details.
ENDPOINT_INFO(getUserById) {
info->summary = "Get one User by userId";
info->addResponse<Object<UserDto>>(Status::CODE_200, "application/json");
info->addResponse<Object<StatusDto>>(Status::CODE_404, "application/json");
info->addResponse<Object<StatusDto>>(Status::CODE_500, "application/json");
info->pathParams["userId"].description = "User Identifier";
}
ENDPOINT("GET", "users/{userId}", getUserById,
PATH(Int32, userId))
{
return createDtoResponse(Status::CODE_200, m_userService.getUserById(userId));
}
See Oat++ ORM for more details.
QUERY(createUser,
"INSERT INTO users (username, email, role) VALUES (:username, :email, :role);",
PARAM(oatpp::String, username),
PARAM(oatpp::String, email),
PARAM(oatpp::Enum<UserRoles>::AsString, role))
Oat++ is used for many different purposes, from building REST APIs that run on embedded devices to
building microservices and highly-loaded cloud applications.
But the majority of use cases appears to be in IoT and Robotics.
Theoretically, Oat++ can be easily ported everywhere where you have threads and network stack.
With an additional comparably small effort, it can be ported almost everywhere depending on how
much you strip it and what would be the final binary size.
See supported platforms for additional info.
About 1Mb, depending on C/C++ std-lib and oatpp version.
Always choose Simple API wherever possible. Simple API is more developed and makes the code cleaner.
Async API is designed for small, specific tasks that run at high concurrency levels ex.:
For all other purposes use simple API.