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

Using .env file for environnement variables #180

Open
cyrilprevot opened this issue Apr 11, 2023 · 3 comments
Open

Using .env file for environnement variables #180

cyrilprevot opened this issue Apr 11, 2023 · 3 comments

Comments

@cyrilprevot
Copy link

Hi Max!

I would like to use environnement variables defined into my .env file. In my case I'm defining env variable to know which google-services.json file to copy (one for production and one for development).

Maybe I'm doing it the wrong way, idk, but I think it could be useful to have access to .env variables.

@mlynch
Copy link
Contributor

mlynch commented Apr 20, 2023

Yea that would be useful. In the meantime you could try something like this?

export $(cat .env | xargs) && npx trapeze run...

@cyrilprevot
Copy link
Author

Yes it works like this thx. I hadn't thought of doing that

@gtbuchanan
Copy link

For reference, Vite uses dotenv internally to handle this. I call trapeze from gulp, so I just configure dotenv in the gulp script. However, you could easily use dotenvx run npx trapeze run instead.

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

3 participants