sqlpage 0.45.0

Build data user interfaces entirely in SQL. A web server that takes .sql files and formats the query result using pre-made configurable professional-looking components.
1
2
3
4
5
6
7
8
9
10
11
use crate::webserver::http_request_info::RequestInfo;

/// Returns the directory where the .sql files are located (the web root).
pub(super) async fn web_root(request: &RequestInfo) -> String {
    request
        .app_state
        .config
        .web_root
        .to_string_lossy()
        .into_owned()
}