Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Danjavia committed Mar 19, 2017
2 parents e4418c5 + c22c74b commit 3846c10
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@ Select the **build folder** and press enter.

# Set Environment Variables

Set your environment variables in *./src/config/env.js* file.
Set your environment variables within .env.<enviroment> files using the **REACT_APP_** prefix for your environment variables

e.g.

```
//.env.local
REACT_APP_MY_CUSTOM_ENV_VAR=https://awesome.site
```

This values would appear in your compiled code after run

Expand All @@ -78,8 +85,17 @@ or

```
// production environment
yarn run deploy
yarn run build:production
```

or

```
// staging environment
yarn run build:staging
```

You can use your env var using **process.env.REACT_APP_MY_CUSTOM_ENV_VAR** in your project.

# Tests

Expand Down

0 comments on commit 3846c10

Please sign in to comment.