haydenwoodhead / burner.kiwi

No bullshit temporary mail service written in Go
https://burner.kiwi
MIT License
216 stars 26 forks source link

generalize env names #11

Closed lopezator closed 5 years ago

lopezator commented 5 years ago

In order to open have a naming that makes sense when using different email providers, the proposal is to rename the following environment names from -> to:

MG_DOMAIN -> API_DOMAIN MG_KEY -> API_KEY

So in #7 I can reuse them without incurring in a naming conflict.

We can keep this open until #7 comes, but wanted to open the issue to grab some feedback from you.

haydenwoodhead commented 5 years ago

I'm not sure about generalizing these environment variables. Not every email provider uses the same amount of environment variables. Sendgrid, for example, only uses one API key, or what about a hypothetical provider that needs four? I think it makes more sense to just have provider-specific variables. Then, if you aren't using that provider don't include them. This is the current strategy for databases (DATABASE_URL vs DYNAMO_TABLE).

My suggestion is to just create a new env var SG_KEY or SENDGRID_KEY. Thoughts?

lopezator commented 5 years ago

That makes sense. Closing.