Skip to content

Instantly share code, notes, and snippets.

@dereckson
Created September 5, 2018 19:51
Show Gist options
  • Save dereckson/98a640314de0cbc19feab80aa26a6e43 to your computer and use it in GitHub Desktop.
Save dereckson/98a640314de0cbc19feab80aa26a6e43 to your computer and use it in GitHub Desktop.
Example to run a Rocket server to serve some routes through Limiting Factor.
use limiting_factor::kernel::DefaultApplication;
use requests::*;
pub fn run () {
let routes = routes![
status,
favicon,
users::register,
users::get_player,
];
DefaultApplication::start_application(routes);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment