This commit is contained in:
JMARyA 2024-05-10 10:56:07 +02:00
parent e50b51c829
commit 39905f53c2
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
5 changed files with 64 additions and 59 deletions

View file

@ -1,5 +1,4 @@
use actix_web::{get, HttpRequest, Responder};
use maud::html;
mod cache;
mod db;
@ -34,7 +33,7 @@ pub(crate) async fn index(r: HttpRequest) -> impl Responder {
async fn main() -> std::io::Result<()> {
env_logger::init();
let itemdb = db::ItemDB::new("./itemdb", "mongodb://user:pass@127.0.0.1:27017").await;
let itemdb = db::ItemDB::new("./itemdb").await;
let itemdb = actix_web::web::Data::new(itemdb);
web_base::map!(web_base::Site::new(), |app: actix_web::App<_>| {