Skip to content

rmedaer/proxygen-routing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proxygen routing: Internal request router for Facebook's HTTP server

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.

Usage

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();

Build and install

The whole build process is not down but you might try the following:

autoreconf -ivf
./configure
make
make install

Credits

The original idea comes from proxygen-tileserver (developed by Goos). I reimplemented this idea with C++ templates, inheritance, etc.

License

Apache-2.0 - Copyright 2016 Raphael Medaer [email protected]

About

Routing system for Facebook's Proxygen server.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published