add very basic logging
This commit is contained in:
parent
fc0a0cb936
commit
8db4706786
|
@ -37,9 +37,11 @@ async fn main() -> tide::Result<()> {
|
||||||
"{}/{}/{}/index.html",
|
"{}/{}/{}/index.html",
|
||||||
webdirs, root_name, index_paths
|
webdirs, root_name, index_paths
|
||||||
))?;
|
))?;
|
||||||
|
println!("registered /")
|
||||||
}
|
}
|
||||||
|
|
||||||
for d in subdirs {
|
for d in subdirs {
|
||||||
|
println!("registered /{d}");
|
||||||
app.at(d.as_str())
|
app.at(d.as_str())
|
||||||
.serve_file(format!("{}/{}/{}/index.html", webdirs, d, index_paths))?;
|
.serve_file(format!("{}/{}/{}/index.html", webdirs, d, index_paths))?;
|
||||||
}
|
}
|
||||||
|
@ -48,9 +50,7 @@ async fn main() -> tide::Result<()> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_env(option: &str) -> Option<String> {
|
fn get_env(option: &str) -> Option<String> {
|
||||||
/*
|
// Get the env var from .env, but if it isn't there, or if the file doesn't exist, get it from the actual env vars
|
||||||
* Get the env var from .env, but if it isn't there, or if the file doesn't exist, get it from the actual env vars
|
|
||||||
*/
|
|
||||||
let text_some = std::fs::read_to_string("./.env").ok();
|
let text_some = std::fs::read_to_string("./.env").ok();
|
||||||
if let Some(text) = text_some {
|
if let Some(text) = text_some {
|
||||||
for line in text.trim().lines().collect::<Vec<&str>>() {
|
for line in text.trim().lines().collect::<Vec<&str>>() {
|
||||||
|
|
Loading…
Reference in New Issue