parent
db23c11875
commit
4e8a4f06c9
2 changed files with 4 additions and 0 deletions
|
@ -13,6 +13,8 @@ actix-cors = "0.7"
|
|||
actix-files = "0.6"
|
||||
tracing-actix-web = "0.7.16"
|
||||
|
||||
argon2 = "0.5.3"
|
||||
|
||||
env_logger = "0.11"
|
||||
|
||||
serde = {version = "1", features = ["derive"]}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use actix_files::NamedFile;
|
||||
use actix_session::{storage::RedisSessionStore, SessionMiddleware};
|
||||
use actix_web::{cookie::Key, middleware::Logger, web, App, HttpResponse, HttpServer};
|
||||
use argon2::Argon2;
|
||||
use db::Database;
|
||||
use std::env;
|
||||
|
||||
|
@ -25,6 +26,7 @@ async fn main() -> std::io::Result<()> {
|
|||
HttpServer::new(move || {
|
||||
let app = App::new()
|
||||
.app_data(web::Data::new(database.clone()))
|
||||
.app_data(web::Data::new(Argon2::default()))
|
||||
.wrap(Logger::default())
|
||||
.wrap(SessionMiddleware::new(
|
||||
redis_conn.clone(),
|
||||
|
|
Loading…
Add table
Reference in a new issue