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

[📖] Document expected environment variables #3642

Closed
ofavre opened this issue Apr 3, 2023 · 2 comments
Closed

[📖] Document expected environment variables #3642

ofavre opened this issue Apr 3, 2023 · 2 comments
Labels
COMMUNITY: good first issue Good for newcomers COMP: docs Improvements or additions to documentation

Comments

@ofavre
Copy link
Contributor

ofavre commented Apr 3, 2023

Suggestion

It seems like some environment variables are pretty mandatory, at least as soon as we're not using a dev server anymore.
See #3325 where @manucorporat suggests one should set the ORIGIN environment variable. I've just been bitten by this too.

Here is what Qwik City adapters use:

Maybe this should be uniformized a bit more and deserves a unique documentation page.
Or maybe each of these adapters should document the necessary environment variables on their respective documentation page.

@PatrickJS
Copy link
Member

merging issue by @n8sabes

Suggestion

This Issue is to capture the discord conversation on Environment Variables w/ related video and repo for tracking purposes.


The attached video explanation and code repo is intended as a community resource that provides insights into environment variables in the Qwik lifecycle, how they are loaded from the .env file, and log them as they flow through the application's lifecycle (between server and client).

The repo allows the developer to explore what is provided as defaults vs loadEnv and dotenv library functions, their scope and depth.

NOTE: This is not a comprehensive guide on environment variables, nor does it cover all the 3rd-Party hosting scenarios, but gives insights that can be applied to all environments. Be sure to exclude .env files from your source control. The repo also contains an example to point elsewhere in the filesystem for the .env.mode files, such as the user/home directory.

Video: https://youtu.be/NPf39RWc8LM

Repo: https://github.com/n8sabes/qwik-env-vars-demystified

@PatrickJS
Copy link
Member

more details was added here #6273 we plan on redoing the env section and provide a better video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMMUNITY: good first issue Good for newcomers COMP: docs Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants