skerkour / kerkour.com

(Ab)using technology for fun & profit. Programming, Hacking & Entrepreneurship @ https://kerkour.com
https://kerkour.com
Apache License 2.0
463 stars 63 forks source link

Question about environmental variables #7

Closed re-taro closed 2 years ago

re-taro commented 2 years ago

Nice to meet you. I have some question about environmental variables in https://github.com/skerkour/kerkour.com/tree/main/2021/deploy_rust_on_heroku 's case. This is my first time to deploy Rust service to Heroku. I want to use environmental variables in this case. But I don't know how to do so. Could you please help me?

sylvain101010 commented 2 years ago

Hi, Nice too meet you :)

The most straightforward way to setup env vars is to to configure them on Heroku: https://devcenter.heroku.com/articles/config-vars

You can then get them from Rust like that: https://kerkour.com/rust-default-environment-variables/

Have a nice day

re-taro commented 2 years ago

Oh I see! Thank you so much!