Skip to content

Commit a670f03

Browse files
committed
update README.md
1 parent 5c710e2 commit a670f03

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,41 @@ Link: File
4848

4949
## Final step: `npm start`
5050

51+
## Optional: Deploy to Heroku
52+
53+
Let's create our app in Heroku:
54+
55+
``` sh
56+
heroku create <app-name> --buildpack mars/create-react-app
57+
```
58+
59+
This will create an app on https://<app-name>.herokuapp.com, make sure to update `Auth.js` redirect uri with this value.
60+
61+
The you'll need to change your code to use environment variables
62+
- Update `Auth.js` to use:
63+
* `process.env.REACT_APP_AUTH0_DOMAIN`
64+
* `process.env.REACT_APP_AUTH0_CLIENT_ID`
65+
66+
And create those environment variables in Heroku:
67+
68+
``` sh
69+
heroku config:set REACT_APP_AUTH0_DOMAIN=<domain>
70+
heroku config:set REACT_APP_AUTH0_CLIENT_ID=<client-id>
71+
```
72+
73+
Then, add the uptaded files to git, commit and then deploy by pushing to `heroku master`:
74+
75+
```
76+
git push heroku master
77+
```
78+
5179
# Other Info
5280

5381
### `npm test`
5482

5583
Launches the test runner in the interactive watch mode.<br>
5684
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
5785

58-
5986
### `npm run build`
6087

6188
Builds the app for production to the `build` folder.<br>

0 commit comments

Comments
 (0)