qserve 1.2.0

Quickly serve your files on your network with speed and simplicity.
1
2
3
4
5
6
7
8
9
use crate::config::get_short_path;

const TEMPLATE: &str = include_str!("../../public/index.html");

pub fn generate(content: &str, path: &str) -> String {
    TEMPLATE
        .replace("{content}", content)
        .replace("{path}", &get_short_path(path.to_string()))
}