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

Improve handling of environment variables #1019

Open
fionnachan opened this issue Jun 29, 2023 · 2 comments
Open

Improve handling of environment variables #1019

fionnachan opened this issue Jun 29, 2023 · 2 comments
Assignees

Comments

@fionnachan
Copy link
Member

fionnachan commented Jun 29, 2023

Let's try out https://github.com/evanshortiss/env-var, and if we find it useful, we can do the same in other repos.

We should load all environment variables in a single file, then export them, so we don't have to call env-var each time an environment variable is used. The variables that are required for running the app should be marked as .required and the app should throw in case they are missing, one such example being NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID.

This would also allow us to get rid of https://github.com/OffchainLabs/arbitrum-token-bridge/blob/master/packages/arb-token-bridge-ui/src/util/index.ts#L24

Some env-var specifics for Next.js: evanshortiss/env-var#162 (comment)

@spsjvc spsjvc added the good first issue Good for newcomers label Jul 7, 2023
@abhirajthakur
Copy link

Hey @spsjvc, I want to start contributing to the open source projects. I am new to it but I want to learn and contribute. Can I ask for the assignment of this issue. I am still new to this so I will be asking a lot of questions. Will it be ok?

@spsjvc
Copy link
Member

spsjvc commented Jul 10, 2023

Hey @abhirajthakur, and thank you for your interest in contributing! 💙

We're actually gonna handle this issue within the team, as we want to try out a couple of different solutions and unify the way we manage environment variables across multiple repositories.

Stay on the lookout for other issues, though!

@spsjvc spsjvc removed the good first issue Good for newcomers label Jul 10, 2023
@spsjvc spsjvc changed the title Throw error if NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID is missing Improve handling for environment variables Jul 13, 2023
@spsjvc spsjvc changed the title Improve handling for environment variables Improve handling of environment variables Jul 13, 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

No branches or pull requests

4 participants
@fionnachan @spsjvc @abhirajthakur and others