Serwus

Helpers for building actix-web/diesel based services.

crates.io Documentation MIT or Apache 2.0 licensed Dependency Status CI downloads

Features

Example

```rust use actixweb::web; use serwus::{ server::{Serwus, defaultcors}, EmptyStats };

[derive(Clone, EmptyStats)]

pub struct AppData;

async fn hello() -> &'static str { "Hello world\n" }

[actix_web::main]

async fn main() -> std::io::Result<()> { let prepareappdata = || AppData;

Serwus::default()
    .start(
        prepare_app_data,
        |app| {
            app.route("/", web::get().to(hello));
        },
        default_cors,
    )
    .await

} ```