This project implements a request routing system for
Proxygen HTTP server.
It's using libr3 to match incoming HTTP request to proxygen::RequestHandler
.
If route is not found it returns a default handler: 404 - Not Found.
std::vector<std::shared_ptr<AbstractRoute>> routes = {
std::make_shared<Route<MyRouteHandler>>("/example", HTTPMethod::GET),
std::make_shared<Route<HelloHandler>>("/hello/{test}", HTTPMethod::GET)
};
HTTPServerOptions options;
options.handlerFactories = RequestHandlerChain()
.addThen<Router>(routes)
.build();
The whole build process is not down but you might try the following:
autoreconf -ivf
./configure
make
make install
The original idea comes from proxygen-tileserver (developed by Goos). I reimplemented this idea with C++ templates, inheritance, etc.
Apache-2.0 - Copyright 2016 Raphael Medaer rme@escaux.com