Update src/main.rs
Browse files- src/main.rs +9 -0
src/main.rs
CHANGED
|
@@ -7,9 +7,18 @@ use sqlx::{PgPool, prelude::FromRow};
|
|
| 7 |
|
| 8 |
#[actix_web::main]
|
| 9 |
async fn main() -> std::io::Result<()> {
|
|
|
|
|
|
|
| 10 |
dotenvy::dotenv().ok();
|
|
|
|
|
|
|
|
|
|
| 11 |
let pool = db().await;
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
HttpServer::new(move || {
|
| 14 |
App::new()
|
| 15 |
.app_data(Data::new(pool.clone()))
|
|
|
|
| 7 |
|
| 8 |
#[actix_web::main]
|
| 9 |
async fn main() -> std::io::Result<()> {
|
| 10 |
+
println!("START APP");
|
| 11 |
+
|
| 12 |
dotenvy::dotenv().ok();
|
| 13 |
+
|
| 14 |
+
println!("LOAD ENV");
|
| 15 |
+
|
| 16 |
let pool = db().await;
|
| 17 |
|
| 18 |
+
println!("DATABASE CONNECTED");
|
| 19 |
+
|
| 20 |
+
println!("START SERVER");
|
| 21 |
+
|
| 22 |
HttpServer::new(move || {
|
| 23 |
App::new()
|
| 24 |
.app_data(Data::new(pool.clone()))
|