Alex Alonso
Alex Alonso

Reputation: 97

Secure way to store database connection string in heroku

I have an open source project on github, and I want to know a way to store my database's connection string without sharing it within the code. Maybe uploading a file that is not on git, with the credentials. Is it possible on Heroku? If not, how do I achieve this?

Thanks in advance

Upvotes: 2

Views: 353

Answers (1)

Jon Mountjoy
Jon Mountjoy

Reputation: 4526

That's what config vars are for. Set one, and it will be available to your app as an environment variable. It lives outside your code base, as you (rightfully) want.

Upvotes: 3

Related Questions