简体   繁体   中英

How can I set environment variables in a Heroku app

So I'm currently working on a side project that requires a database. I choose to opt for MongoDB. I have the dotenv package installed so I can use this to save my secret mongoDB connection string.

I'd like to deploy my application to Heroku, but of course I don't want to push my.env to a github repo for this. Is there any way around this? It is a heroku-git repo but I have no idea how secure this would be. Anyone any other ideas on how to still keep the connection string secret and push the app to a platform like Heroku?

In the Settings tab of your app, the option is present

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM