arami21 commited on
Commit
a1dfd3d
·
verified ·
1 Parent(s): ae6dd58

Update src/main.rs

Browse files
Files changed (1) hide show
  1. src/main.rs +4 -2
src/main.rs CHANGED
@@ -19,8 +19,9 @@ use sqlx::{PgPool, prelude::FromRow};
19
 
20
  #[actix_web::main]
21
  async fn main() -> std::io::Result<()> {
 
22
  dotenvy::dotenv().ok();
23
-
24
  let pool = match db().await {
25
  Ok(pool) => {
26
  println!("Database connected!");
@@ -34,10 +35,11 @@ async fn main() -> std::io::Result<()> {
34
  ));
35
  }
36
  };
37
-
38
  let key = Key::generate();
39
  let session_store = RedisSessionStore::new("rediss://default:gQAAAAAAAhlpAAIgcDE1NTRjMzkzODkwYWM0YTRlYjNiOTRkY2FmNWIzOTRlYg@liked-honeybee-137577.upstash.io:6379").await.unwrap();
40
 
 
41
  HttpServer::new(move || {
42
  App::new()
43
  .app_data(Data::new(pool.clone()))
 
19
 
20
  #[actix_web::main]
21
  async fn main() -> std::io::Result<()> {
22
+ println!("START APP");
23
  dotenvy::dotenv().ok();
24
+ println!("LOAD ENV");
25
  let pool = match db().await {
26
  Ok(pool) => {
27
  println!("Database connected!");
 
35
  ));
36
  }
37
  };
38
+ println!("DATABASE CONNECTED");
39
  let key = Key::generate();
40
  let session_store = RedisSessionStore::new("rediss://default:gQAAAAAAAhlpAAIgcDE1NTRjMzkzODkwYWM0YTRlYjNiOTRkY2FmNWIzOTRlYg@liked-honeybee-137577.upstash.io:6379").await.unwrap();
41
 
42
+ println!("START SERVER");
43
  HttpServer::new(move || {
44
  App::new()
45
  .app_data(Data::new(pool.clone()))