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

Move constants & env to central config #107

Merged
merged 8 commits into from
Nov 3, 2023

Conversation

Timothy-Gonzalez
Copy link
Member

Resolves #90

This PR moves all usages of process.env.* to a central config.ts file which replaces the old constants.ts file. Also, instead of having a arbitrary class, it is now a pure JS object, so it's much easier to edit and use.

This allows us to remove the temporary database/getBaseUrl.ts and as such refactors test mocks to work alongside the new changes.

I haven't verified everything works, but tests do pass so the bare minimum at least does. Should test auth to verify this doesn't brick anything.

Previous version only used .env files, this allows for the local
env variables set in a terminal for example to override the ones in the
.env files
@Timothy-Gonzalez
Copy link
Member Author

Don't merge yet, preview 500s

@Timothy-Gonzalez Timothy-Gonzalez merged commit a9d49e3 into main Nov 3, 2023
5 checks passed
@Timothy-Gonzalez Timothy-Gonzalez deleted the dev/timothy/move-to-central-config branch November 3, 2023 22:07
Timothy-Gonzalez added a commit that referenced this pull request Nov 5, 2023
Timothy-Gonzalez added a commit that referenced this pull request Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better env variable management
2 participants