Skip to content

Commit

Permalink
add example how to run dotenvx and ampx in one line for local develop…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
kreuzhofer committed Dec 20, 2024
1 parent a001291 commit ae74115
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,9 @@ console.log('REACT_APP_TEST_VARIABLE', process.env.REACT_APP_TEST_VARIABLE);
### Local environment

When working on your local machine, you must manually load the sandbox's environment variables. First, add the environment variable in your `.env.local` file. Then, a library such as [`@dotenvx/dotenvx`](https://www.npmjs.com/package/@dotenvx/dotenvx) can load the environment variables, which you can then reference with `process.env`.

You can run dotenvx to load the environment variables in your local environment:

```bash title="Terminal" showLineNumbers={false}
npx dotenvx run npx ampx sandbox
```

0 comments on commit ae74115

Please sign in to comment.