This commit is contained in:
Untone 2023-10-11 18:19:56 +03:00
parent f66ea24f7e
commit 9fd6a89f7f

View File

@ -1,4 +1,5 @@
use actix_web::{web, App, HttpResponse, HttpServer, web::Bytes}; use actix_web::{web, App, HttpResponse, HttpServer, web::Bytes};
use actix_web::middleware::Logger;
use redis::{Client, AsyncCommands}; use redis::{Client, AsyncCommands};
use std::collections::HashMap; use std::collections::HashMap;
use std::env; use std::env;
@ -119,6 +120,7 @@ async fn main() -> std::io::Result<()> {
HttpServer::new(move || { HttpServer::new(move || {
println!("Webserver initialized"); println!("Webserver initialized");
App::new() App::new()
.wrap(Logger::default()) // Added this line
.app_data(web::Data::new(state.clone())) .app_data(web::Data::new(state.clone()))
.service( .service(
web::scope("") web::scope("")