Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ability to pass in API key via env vars #709

Merged
merged 11 commits into from
Dec 9, 2022

Conversation

kanadgupta
Copy link
Member

@kanadgupta kanadgupta commented Dec 9, 2022

🧰 Changes

Allows a user to pass in an API key via an env variable called RDME_API_KEY (as part of some little upcoming projects 👀). Also added some tests and docs related to this.

I tried to abstract away all the complexity around this by creating a new getStoredConfig() function, lemme know what y'all think!

@kanadgupta kanadgupta marked this pull request as ready for review December 9, 2022 18:37
@kanadgupta kanadgupta added the enhancement New feature or request label Dec 9, 2022
it's unlikely that the user won't have a key and that the env will mess with this, so let's just use this logic to keep everything tidy
README.md Show resolved Hide resolved
src/lib/getStoredConfig.ts Outdated Show resolved Hide resolved
__tests__/index.test.ts Outdated Show resolved Hide resolved
@kanadgupta kanadgupta requested a review from RyanGWU82 December 9, 2022 18:53
@kanadgupta kanadgupta merged commit 16216d1 into main Dec 9, 2022
@kanadgupta kanadgupta deleted the refactor/env-keys-for-vars branch December 9, 2022 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants