get assets from env variable, fallback to "public"
This commit is contained in:
parent
af5ab5b197
commit
6bda740440
1 changed files with 3 additions and 1 deletions
|
|
@ -17,8 +17,10 @@ use pages::*;
|
|||
|
||||
#[rocket::launch]
|
||||
fn rocket() -> _ {
|
||||
let assets = std::env::var("PLCOM_ASSETS_PATH").unwrap_or("public".into());
|
||||
|
||||
let server = rocket::build()
|
||||
.mount("/", rocket::fs::FileServer::from("public"))
|
||||
.mount("/", rocket::fs::FileServer::from(assets))
|
||||
.mount(
|
||||
"/",
|
||||
rocket::routes![root_route, email_route, wallpapers_route],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue