summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index d454a8c..4b8762d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -9,9 +9,11 @@ use services::*;
#[actix_web::main]
async fn main() -> Result<(), RawUnexpected> {
+ // initialize the database
let db_url = secrets::database_url()?;
let sql_pool = db::initialize(&db_url).await?;
+ // start the server
HttpServer::new(move || {
App::new()
.app_data(Data::new(sql_pool.clone()))