An ultra-fast C++ micro web framework/server
{
"address": "127.0.0.1",
"port": "8080"
}
#include "R0CK3T.h"
using namespace R0CK3T;
class HomeController {
public:
static void index(const HttpRequest& request, HttpResponse& response)
{
json data;
data["message"] = "Hello World";
response.json(data);
}
};
#include "R0CK3T.h"
#include "home_controller.h"
using namespace R0CK3T;
int main()
{
Server server;
auto app = server.app();
app->get("/", &HomeController::index);
server.run();
return 0;
}
{
"message": "Hello World"
}
- Example
- Rest
- Templates
- C++11
- Boost (1.65.1)
$ /R0CK3T/bin/tests/R0CK3T --log_level=test_suite