1
0
Fork 0
This repository has been archived on 2023-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
fedihub-website/src/web.rs

13 lines
342 B
Rust
Raw Normal View History

2020-10-15 00:16:06 +00:00
use crate::config;
use crate::database;
use crate::routes;
use rocket_contrib::templates::Template;
pub fn rocket(config: config::Config) -> rocket::Rocket {
rocket::custom(config.to_rocket_config().unwrap())
.manage(database::create_db_pool(config))
.attach(Template::fairing())
.mount("/", routes::routes())
}