Quantcast
Channel: How to set up a database connection from environment in Rocket? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by SS_Rebelious for How to set up a database connection from...

After a lot of experiments (as there is no specific instructions for the database and I expected something that looked more like a standard approach: ENV_PARAM=conn_string, i.e. in Diesel) I finally...

View Article



Answer by Stargateur for How to set up a database connection from environment...

I would like to set username, password and a database name from the environment. Didn't find relevant example for Rocket.Front page of the docRocket and Rocket libraries are configured via the...

View Article

How to set up a database connection from environment in Rocket?

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 =...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images