pub fn spa() -> Spa
Expand description

Constructs a new Single-page Application (SPA) builder.

See Spa docs for more details.

Examples

let app = App::new()
    // ...api routes...
    .service(
        spa()
            .index_file("./examples/assets/spa.html")
            .static_resources_mount("/static")
            .static_resources_location("./examples/assets")
            .finish()
    );