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 notes about environment variable commenting #49

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions docs/secrets-management/dotenv-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## DotEnv File

This approach is inspired by how usually developers manage secrets in their source code.
This approach is inspired by commonly used practices to manage secrets in source code.

In this approach, you can store all your secrets in a `.env` file at the root of your collection folder.
In this approach all secrets are stored in a `.env` file at the root of the collection folder.

Bruno will automatically load the secrets from this file and make them available to your collection via `process.env.<secret-name>`.

Expand All @@ -22,3 +22,13 @@ And now you can safely checkin your collection to source control without worryin
Don't forget to add `.env` to your `.gitignore` file.

You can store a `.env.sample` file in your collection folder to help other developers get started with the collection.

## Comments in .env file

The environment file format allows for comments using the hash character (#). Anything after the hash character will
be ignored by default. This includes environment variable values. In order to use values that contain a hash character,
place the value in double-quotes like shown below

```properties
key_name="key_value"
```