Final fixes for docker optimisation
Also fixed up error of forgetting to include an await in the main function
This commit is contained in:
parent
e2c83c817b
commit
6741ed9e14
@ -2,7 +2,7 @@
|
||||
name = "mail_app"
|
||||
version = "0.1.0"
|
||||
authors = ["Nick Bland"]
|
||||
edition = "2021"
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
|
@ -1,5 +1,4 @@
|
||||
use std::net::TcpListener;
|
||||
use sqlx::PgPool;
|
||||
use sqlx::postgres::PgPoolOptions;
|
||||
|
||||
use mail_app::startup::run;
|
||||
@ -18,6 +17,7 @@ async fn main() -> std::io::Result<()> {
|
||||
let connection_pool = PgPoolOptions::new()
|
||||
.connect_timeout(std::time::Duration::from_secs(2))
|
||||
.connect(&configuration.database.connection_string())
|
||||
.await
|
||||
.expect("Failed to connect to Postgres.");
|
||||
|
||||
// Take port from settings file
|
||||
|
Loading…
Reference in New Issue
Block a user