pub async fn perseus_base_app<M, T>(
    turbine: &'static Turbine<M, T>,
    opts: ServerOptions,
) -> Rocket<Build>
where
    M: MutableStore + 'static,
    T: TranslationsManager + 'static,
{
    let get_locale = Route::new(
        Method::Get,
        "/translations/<path..>",
        RocketHandlerWithTurbine {
            turbine,
            perseus_route: PerseusRouteKind::Locale,
        },
    );
    let get_localized_initial_consts = Route::new(
        Method::Get,
        "/initial_consts/<path>", // Rocket doesn't seem to let us add `.js` here
        RocketHandlerWithTurbine {
            turbine,
            perseus_route: PerseusRouteKind::LocalizedInitialConsts,
        },
    );
    let get_unlocalized_initial_consts = Route::new(
        Method::Get,
        "/initial_consts.js",
        RocketHandlerWithTurbine {
            turbine,
            perseus_route: PerseusRouteKind::UnlocalizedInitialConsts,
        },
    );

    // Since this route matches everything, its rank has been set to 100,
    // That means that it will be used after routes that have a rank inferior to 100
    // forward, see https://rocket.rs/v0.5-rc/guide/requests/#default-ranking
    let get_initial_load_handler = Route::ranked(
        100,
        Method::Get,
        "/<path..>",
        RocketHandlerWithTurbine {
            turbine,
            perseus_route: PerseusRouteKind::IntialLoadHandler,
        },
    );

    let get_subsequent_load_handler = Route::new(
        Method::Get,
        "/page/<path..>",
        RocketHandlerWithTurbine {
            turbine,
            perseus_route: PerseusRouteKind::SubsequentLoadHandler,
        },
    );

    let mut perseus_routes: Vec<Route> =
        routes![get_js_bundle, get_wasm_js_bundle, get_wasm_bundle];
    perseus_routes.append(&mut vec![
        get_locale,
        get_subsequent_load_handler,
        get_unlocalized_initial_consts,
        get_localized_initial_consts,
    ]);

    let mut app = rocket::build()
        .manage(opts.clone())
        .mount("/.perseus/", perseus_routes)
        .mount("/", vec![get_initial_load_handler]);

    if Path::new(&opts.snippets).exists() {
        app = app.mount("/.perseus/snippets", FileServer::from(opts.snippets))
    }

    if turbine.static_dir.exists() {
        app = app.mount("/.perseus/static", FileServer::from(&turbine.static_dir))
    }

    let mut static_aliases: Vec<Route> = vec![];

    for (url, static_path) in turbine.static_aliases.iter() {
        let route = Route::new(
            Method::Get,
            url,
            RocketHandlerWithTurbine {
                turbine,
                perseus_route: PerseusRouteKind::StaticAlias(static_path),
            },
        );
        static_aliases.push(route)
    }

    app = app.mount("/", static_aliases);

    app
}
Configures an Rocket Web app for Perseus.
This returns a rocket app at the build stage that can be built upon further
with more routes, fairings etc...
packages/perseus-rocket/src/lib.rs