Using RDXL with Rocket

Setting up a route that returns DHTML

Taking much from rockets first example it is very easy to configure a route that returns Dynamic HTML. RDXL and even RDXL Static plays well mostly with any Rocket Project.

#[macro_use] extern crate rocket;
use rdxl::xhtml;

fn hello(name: String, age: u8) -> String {
   xhtml!(Hello, {{age}} year old named {{name}})

fn main() {
   rocket::ignite().mount("/", routes![hello]).launch();