macro_rules! response {
    ($path:literal, $content_type:expr) => { ... };
}
Expand description

Http responder that returns the file at $path (relative to the “frontend” directory) as the body, using $content_type as the Content-Type header. Also serves ETags and responds appropriately, using hashes of the file contents, which are evaluated once on first access. The files are included using include_bytes, so they’re static throughout the program’s lifetime, and built into the server executable.