build pipeline, health check works again
This commit is contained in:
@ -12,9 +12,9 @@ async fn main() -> std::io::Result<()> {
|
||||
|
||||
let config = get_configuration().expect("Failed to read configuration");
|
||||
let connection_pool = PgPoolOptions::new()
|
||||
.max_connections(10).connect(config.database.connection_string().expose_secret()).await.expect("Failed to connect to Postgres.");
|
||||
.max_connections(10).connect_lazy(config.database.connection_string().expose_secret()).expect("Failed to connect to Postgres.");
|
||||
|
||||
let address = format!("127.0.0.1:{}", config.application_port);
|
||||
let address = format!("{}:{}", config.application.host, config.application.port);
|
||||
let listener = TcpListener::bind(address).expect("Failed to bind random port");
|
||||
run(listener, connection_pool)?.await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user