Update dependencies

This commit is contained in:
2024-01-31 16:51:49 +01:00
parent ef049e5171
commit 38186e4371
6 changed files with 1207 additions and 1030 deletions

View File

@ -3,8 +3,8 @@ mod routes;
use dotenv::dotenv;
use health::HealthState;
use rocket_contrib::serve::StaticFiles;
use rocket_contrib::templates::Template;
use rocket::fs::FileServer;
use rocket_dyn_templates::Template;
use std::sync::Arc;
use std::time::Duration;
use std::{env, io};
@ -31,15 +31,11 @@ async fn main() -> io::Result<()> {
let config = ron::from_str(&config).expect("failed to parse config file");
let state = Arc::new(HealthState::new(config));
let rocket = rocket::ignite()
//.attach(Template::custom(|engines| {
//handlebars_util::register_helpers(engines)
//}))
let rocket = rocket::build()
.attach(Template::fairing())
.manage(Arc::clone(&state))
.mount("/static", StaticFiles::from("static"))
.mount("/static", FileServer::from("static"))
.mount("/", rocket::routes![routes::pages::dashboard]);
//.register(rocket::catchers![auth::login_page,]);
start_poller(state);