I have following working database connection setup for my Rocket app:
main.rs:
#[database("my_db")]pub struct DbConn(diesel::PgConnection);
Rocket.toml:
[global.databases]my_db = { url = "postgres://user:pass@localhost/my_db" }
I would like to set username, password and a database name from the environment. Expected it to be something like ROCKET_MY_DB=postgres://user:pass@localhost/my_db
, but it didn't work. Was unable find relevant database example for Rocket.