-
Notifications
You must be signed in to change notification settings - Fork 52
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
add env-vars documentation #42
Conversation
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.
Mommy believes you can do better if you really put yourself into the contribution. 🖤
**Temporary (for the current session):** | ||
|
||
```bash | ||
export VARIABLE_NAME=value |
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.
This example could be changed to one more topical to cargo mommy
.
Add the export command to your shell profile file (e.g., ~/.bashrc, ~/.zshrc). | ||
|
||
```bash | ||
echo 'export VARIABLE_NAME=value' >> ~/.bashrc |
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.
echo 'export VARIABLE_NAME=value' >> ~/.bashrc | |
echo 'export VARIABLE_NAME=value' >> ~/.bashrc |
ditto.
**Permanent (across sessions):** | ||
Add the export command to your shell profile file (e.g., ~/.bashrc, ~/.zshrc). |
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.
This doesn't explain why it makes this change permanent.
|
||
## Environment Variables Overview | ||
|
||
Environment variables are dynamic-named values that affect the processes running on an operating system. They are used to store configuration settings, paths, and other important information. Here's a step-by-step guide on how to work with environment variables. |
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.
Environment variables are dynamic-named values that affect the processes running on an operating system. They are used to store configuration settings, paths, and other important information. Here's a step-by-step guide on how to work with environment variables. | |
Environment variables are dynamically-named values that affect the processes running on an operating system. They are used to store configuration settings, paths, and other important information. Here's a step-by-step guide on how to work with environment variables. |
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.
However, in general, these docs don't need to explain this in a general way. Mommy needs an explanation for cargo mommy
in particular!
# Example: Adding a custom directory to the PATH | ||
export PATH=$PATH:/path/to/custom/directory | ||
|
||
# Example: Setting a default editor | ||
export EDITOR=vim |
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.
ditto.
export NODE_ENV=development | ||
export PORT=3000 |
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.
ditto.
export PYTHONPATH=/path/to/project | ||
export FLASK_ENV=development |
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.
ditto.
## 5. Security Considerations: | ||
|
||
**Avoid storing sensitive information directly in environment variables.** | ||
**On Windows, be cautious about using environment variables in scripts as they can be easily accessed.** | ||
|
||
## 6. Best Practices: | ||
|
||
**Use uppercase letters and underscores for variable names (e.g., DATABASE_URL).** | ||
**Document your environment variables in a README file for better collaboration.** | ||
|
||
By following these steps and examples, you can effectively manage and use environment variables in various scenarios, making your development environment more flexible and scalable. |
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.
Irrelevant.
## 5. Security Considerations: | |
**Avoid storing sensitive information directly in environment variables.** | |
**On Windows, be cautious about using environment variables in scripts as they can be easily accessed.** | |
## 6. Best Practices: | |
**Use uppercase letters and underscores for variable names (e.g., DATABASE_URL).** | |
**Document your environment variables in a README file for better collaboration.** | |
By following these steps and examples, you can effectively manage and use environment variables in various scenarios, making your development environment more flexible and scalable. |
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.
Alternately, consider a heading like
## 5. Consent Considerations:
## 4. Windows Considerations: | ||
|
||
**On Windows, environment variables can be set through the System Properties or using PowerShell.** | ||
**To persistently modify environment variables on Windows, use the [System Properties](https://www.computerhope.com/issues/ch000549.htm) window. This requires administrative privileges.** |
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.
This should explain the persistence of PowerShell's env vars instead.
This will somewhat duplicate the effort of, and has conceptual conflicts, respectively, with |
This change resolves #31 by adding documentation for env-vars.
Signed-off-by: Jason Zubiate [email protected]