work
This commit is contained in:
parent
e50b51c829
commit
39905f53c2
5 changed files with 64 additions and 59 deletions
|
@ -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<_>| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue