some basic viewer

This commit is contained in:
Robin Appelman 2023-04-29 14:54:53 +02:00
commit 5910b2f35a
45 changed files with 1089 additions and 1436 deletions

View file

@ -32,7 +32,13 @@ pub fn guess_mime(path: &str) -> &'static str {
return "image/png";
} else if path.ends_with("css") {
return "text/css";
} else if path.ends_with("js") {
} else if path.ends_with("wasm") {
return "application/wasm";
} else if path.ends_with("js")
|| path.ends_with("ts")
|| path.ends_with("jsx")
|| path.ends_with("tsx")
{
return "text/javascript";
}
return "text/plain";