mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
http_private: handle lacking DATABASE_URL env var better
This commit is contained in:
parent
30d06937fc
commit
8478a2b052
1 changed files with 2 additions and 1 deletions
|
|
@ -32,7 +32,8 @@ async fn run_app(
|
||||||
tcp_listener: TcpListener,
|
tcp_listener: TcpListener,
|
||||||
request_sender: ChannelRequestSender,
|
request_sender: ChannelRequestSender,
|
||||||
) -> anyhow::Result<()> {
|
) -> anyhow::Result<()> {
|
||||||
let db_url = ::std::env::var("DATABASE_URL").expect("env var DATABASE_URL");
|
let db_url =
|
||||||
|
::std::env::var("DATABASE_URL").with_context(|| "Retrieve env var DATABASE_URL")?;
|
||||||
|
|
||||||
let pool = MySqlPoolOptions::new()
|
let pool = MySqlPoolOptions::new()
|
||||||
.max_connections(5)
|
.max_connections(5)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue