live-server 0.11.1

Launch a local network server with live reload feature for static pages.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use axum::body::Body;

pub(crate) fn index_html(index: &str, script: &str, body: &str) -> Body {
    Body::from(format!(
        include_str!("../templates/index.html"),
        index, script, body
    ))
}

pub(crate) fn error_html(script: &str, body: &str) -> Body {
    Body::from(format!(
        include_str!("../templates/error.html"),
        script, body
    ))
}