zero4rs 2.0.0

zero4rs is a powerful, pragmatic, and extremely fast web framework for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::prelude2::*;

pub async fn gps_index(request: HttpRequest) -> impl Responder {
    let mut ctx = tera::Context::new();

    ctx.insert(
        "GAODE_MAP_KEY",
        &crate::commons::read_env("GAODE_MAP_KEY", "GAODE_MAP_KEY"),
    );
    ctx.insert(
        "GAODE_MAP_JSCODE",
        &crate::commons::read_env("GAODE_MAP_JSCODE", "GAODE_MAP_JSCODE"),
    );

    request.render(200, "gpss/gpss_index.html", ctx)
}