Log static web files location
This commit is contained in:
parent
1f9bb320df
commit
7814984e02
1 changed files with 3 additions and 4 deletions
|
@ -238,16 +238,15 @@ fn run() -> Result<()> {
|
||||||
mount.mount(&api_url, handler);
|
mount.mount(&api_url, handler);
|
||||||
|
|
||||||
// Mount static files
|
// Mount static files
|
||||||
let static_url = format!("/{}", &prefix_url);
|
|
||||||
|
|
||||||
info!("Mounting static files on {}", static_url);
|
|
||||||
let web_dir_name = matches.opt_str("w");
|
let web_dir_name = matches.opt_str("w");
|
||||||
let mut default_web_dir = utils::get_data_root()?;
|
let mut default_web_dir = utils::get_data_root()?;
|
||||||
default_web_dir.push("web");
|
default_web_dir.push("web");
|
||||||
let web_dir_path = web_dir_name
|
let web_dir_path = web_dir_name
|
||||||
.map(|n| Path::new(n.as_str()).to_path_buf())
|
.map(|n| Path::new(n.as_str()).to_path_buf())
|
||||||
.unwrap_or(default_web_dir);
|
.unwrap_or(default_web_dir);
|
||||||
|
info!("Static files location is {}", web_dir_path.display());
|
||||||
|
let static_url = format!("/{}", &prefix_url);
|
||||||
|
info!("Mounting static files on {}", static_url);
|
||||||
mount.mount(&static_url, Static::new(web_dir_path));
|
mount.mount(&static_url, Static::new(web_dir_path));
|
||||||
|
|
||||||
info!("Starting up server");
|
info!("Starting up server");
|
||||||
|
|
Loading…
Add table
Reference in a new issue