great-xylophone-57040
01/13/2023, 6:23 PMdiesel setup
cmd
pub fn establish_connection() -> Pool<ConnectionManager<PgConnection>> {
let database_url = std::env::var("DATABASE_URL").expect("DATABASE_URL must be set");
let manager = ConnectionManager::<PgConnection>::new(database_url);
Pool::new(manager).expect("Failed to create pool.")
}agreeable-painting-48846
01/13/2023, 7:08 PMpostgres://postgres:password@localhost:5432/DBnamehereagreeable-painting-48846
01/13/2023, 7:12 PMagreeable-painting-48846
01/13/2023, 7:24 PMshuttle-secrets and feeding that into the connection manager instead of using std::env::var - docs are here if you need them https://docs.shuttle.rs/resources/shuttle-secretsgreat-xylophone-57040
01/14/2023, 9:54 PMagreeable-painting-48846
01/14/2023, 9:54 PMagreeable-painting-48846
01/25/2023, 4:30 PMcreamy-tent-74516
01/25/2023, 4:30 PMcreamy-tent-74516
01/25/2023, 4:31 PMagreeable-painting-48846
01/25/2023, 4:31 PM