Skip to content

Commit

Permalink
Merge pull request #7 from dcoomber/feature/process-env-secrets
Browse files Browse the repository at this point in the history
Aligned docs with proposed feature in app repo Re #6
  • Loading branch information
helloanoop committed Aug 17, 2023
2 parents a827beb + 9a3d80b commit 97f568d
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions docs/scripting/javascript-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,28 @@ Get the response data
let data = res.getBody();
```

## Node process environment
Bruno allows you to get Node process environment variables on the fly.

### `getProcessEnv`
Get the Node process environment variable. This allows secret token usage without committing secrets to version control.

**Example:**
```javascript
let secret_token = bru.getProcessEnv("secret_access_token");
```
## Environments
Bruno allows you to get and set env variables on the fly.
Bruno allows you to get and set Bruno environment variables on the fly.

### `getEnvVar`
Get the environment variable
Get the Bruno environment variable

**Example:**
```javascript
let token = bru.getEnvVar("access_token");
```
### `setEnvVar`
Set the environment variable
Set the Bruno environment variable

**Example:**
```javascript
Expand Down

1 comment on commit 97f568d

@vercel
Copy link

@vercel vercel bot commented on 97f568d Aug 17, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.