Update dependencies
This commit is contained in:
12
src/main.rs
12
src/main.rs
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user