Quantcast
Channel: How to set up a database connection from environment in Rocket? - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Answer by SS_Rebelious for How to set up a database connection from environment in Rocket?

$
0
0

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 figured out that I need to place a complex object into the environment.

The solution is this ugly string:

ROCKET_DATABASES={my_db={url="postgres://user:pass@localhost/my_db"}}


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>