-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Document process.loadEnvFile for loading .env files #8233
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
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
💡 Enable Vercel Agent with $100 free credit for automated AI reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds documentation for process.loadEnvFile()
, a built-in Node.js API for loading .env
files programmatically. The documentation complements the existing CLI flag (--env-file
) section by providing developers with a programmatic alternative.
Key changes:
- Added a new section documenting the
process.loadEnvFile(path)
API - Included code examples showing both default and custom path usage
- Documented version history, parameters, and behavior notes
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
apps/site/pages/en/learn/command-line/how-to-read-environment-variables-from-nodejs.md
Outdated
Show resolved
Hide resolved
Added information about loading .env files programmatically in Node.js using process.loadEnvFile. Signed-off-by: YCM Jason <me@ycmjason.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
apps/site/pages/en/learn/command-line/how-to-read-environment-variables-from-nodejs.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
apps/site/pages/en/learn/command-line/how-to-read-environment-variables-from-nodejs.md
Outdated
Show resolved
Hide resolved
apps/site/pages/en/learn/command-line/how-to-read-environment-variables-from-nodejs.md
Outdated
Show resolved
Hide resolved
apps/site/pages/en/learn/command-line/how-to-read-environment-variables-from-nodejs.md
Show resolved
Hide resolved
apps/site/pages/en/learn/command-line/how-to-read-environment-variables-from-nodejs.md
Outdated
Show resolved
Hide resolved
apps/site/pages/en/learn/command-line/how-to-read-environment-variables-from-nodejs.md
Show resolved
Hide resolved
…variables-from-nodejs.md Co-authored-by: Aviv Keller <me@aviv.sh> Signed-off-by: YCM Jason <me@ycmjason.com>
…variables-from-nodejs.md Co-authored-by: Aviv Keller <me@aviv.sh> Signed-off-by: YCM Jason <me@ycmjason.com>
…variables-from-nodejs.md Co-authored-by: Aviv Keller <me@aviv.sh> Signed-off-by: YCM Jason <me@ycmjason.com>
…variables-from-nodejs.md Co-authored-by: Aviv Keller <me@aviv.sh> Signed-off-by: YCM Jason <me@ycmjason.com>
…variables-from-nodejs.md Co-authored-by: Aviv Keller <me@aviv.sh> Signed-off-by: YCM Jason <me@ycmjason.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
I haven't had a chance to dig in but seems odd that the preview shows a 500 error? https://nodejs-btlkbb6vr-openjs.vercel.app/en/learn/command-line/how-to-read-environment-variables-from-nodejs |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8233 +/- ##
==========================================
- Coverage 76.43% 76.41% -0.03%
==========================================
Files 115 115
Lines 9643 9643
Branches 317 318 +1
==========================================
- Hits 7371 7369 -2
- Misses 2271 2273 +2
Partials 1 1 ☔ View full report in Codecov by Sentry. |
apps/site/pages/en/learn/command-line/how-to-read-environment-variables-from-nodejs.md
Outdated
Show resolved
Hide resolved
…variables-from-nodejs.md Co-authored-by: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com> Signed-off-by: YCM Jason <me@ycmjason.com>
apps/site/pages/en/learn/command-line/how-to-read-environment-variables-from-nodejs.md
Show resolved
Hide resolved
…variables-from-nodejs.md Co-authored-by: Michael Esteban <mickel13@gmail.com> Signed-off-by: YCM Jason <me@ycmjason.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you
@ycmjason please lint, then we can merge |
Description
Added information about loading .env files programmatically in Node.js using
process.loadEnvFile
.Validation
N/A
Related Issues
N/A
Check List
pnpm format
to ensure the code follows the style guide.pnpm test
to check if all tests are passing.pnpm build
to check if the website builds without errors.