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

add env-vars documentation #42

Closed
wants to merge 1 commit into from
Closed

add env-vars documentation #42

wants to merge 1 commit into from

Conversation

jasonzubiate
Copy link

This change resolves #31 by adding documentation for env-vars.
Signed-off-by: Jason Zubiate jzubiate.dev@gmail.com

Copy link
Contributor

@workingjubilee workingjubilee left a 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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo 'export VARIABLE_NAME=value' >> ~/.bashrc
echo 'export VARIABLE_NAME=value' >> ~/.bashrc

ditto.

Comment on lines +17 to +18
**Permanent (across sessions):**
Add the export command to your shell profile file (e.g., ~/.bashrc, ~/.zshrc).
Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Contributor

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!

Comment on lines +41 to +45
# Example: Adding a custom directory to the PATH
export PATH=$PATH:/path/to/custom/directory

# Example: Setting a default editor
export EDITOR=vim
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto.

Comment on lines +63 to +64
export NODE_ENV=development
export PORT=3000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto.

Comment on lines +70 to +71
export PYTHONPATH=/path/to/project
export FLASK_ENV=development
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto.

Comment on lines +79 to +89
## 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Irrelevant.

Suggested change
## 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.

Copy link
Contributor

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:

Comment on lines +74 to +77
## 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.**
Copy link
Contributor

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.

@workingjubilee
Copy link
Contributor

This will somewhat duplicate the effort of, and has conceptual conflicts, respectively, with

@jasonzubiate jasonzubiate closed this by deleting the head repository Nov 12, 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

Successfully merging this pull request may close these issues.

add better docs for how to use env-vars
2 participants