Skip to content

Latest commit

 

History

History
81 lines (59 loc) · 1.22 KB

README.md

File metadata and controls

81 lines (59 loc) · 1.22 KB

R0CK3T 🚀

An ultra-fast C++ micro web framework/server

stability-wip

Basic usage

config.json

{
  "address": "127.0.0.1",
  "port": "8080"
}

home_controller.h

#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);
	}
};

main.cpp

#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;
}

output

{
  "message": "Hello World"
}

Documentation

Libraries

Requirements

Runnig Unit Tests

$ /R0CK3T/bin/tests/R0CK3T --log_level=test_suite