Compare commits

...

2 commits

Author SHA1 Message Date
46a42710e1 add missing .mov content type 2024-03-26 19:55:20 +01:00
b27b952359 set root dir with argument 2024-03-26 19:55:08 +01:00
2 changed files with 8 additions and 1 deletions

View file

@ -163,6 +163,7 @@ impl Content {
"3gp" => "video/3gpp",
"3gp2" => "video/3gpp2",
"avi" => "video/x-msvideo",
"mov" => "video/mov",
"mp4" => "video/mp4",
"mpeg" => "video/mpeg",
"ogv" => "video/ogv",

View file

@ -18,7 +18,13 @@ fn main() {
} else {
&args[1]
};
println!("Starting server on {:?}...\n", &host);
println!("Starting server on {:?}", &host);
if args.len() > 2 {
env::set_current_dir(&args[2]).expect("root dir specified must be valid path");
println!("Set root dir to {}", &args[2]);
}
println!();
let listener = TcpListener::bind(host).expect("Could not bind to address");