File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
5583Launches the test runner in the interactive watch mode.<br >
5684See 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
6188Builds the app for production to the ` build ` folder.<br >
You can’t perform that action at this time.
0 commit comments