live_server/http_layer/
template.rs

1use axum::body::Body;
2
3pub(crate) fn index_html(index: &str, script: &str, body: &str) -> Body {
4    Body::from(format!(
5        include_str!("../templates/index.html"),
6        index, script, body
7    ))
8}
9
10pub(crate) fn error_html(script: &str, body: &str) -> Body {
11    Body::from(format!(
12        include_str!("../templates/error.html"),
13        script, body
14    ))
15}