Compare commits
2 commits
864f94ba5d
...
46a42710e1
Author | SHA1 | Date | |
---|---|---|---|
46a42710e1 | |||
b27b952359 |
2 changed files with 8 additions and 1 deletions
|
@ -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",
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in a new issue