@@ -11,18 +11,25 @@ Run the development server using `npm run start`
11
11
You can edit them in ` .env ` file.
12
12
13
13
# Heroku Deployment
14
+ Make sure your variables are defined in .env first.
15
+
16
+ Install the heroku config plugin:
17
+ ```
18
+ heroku plugins:install heroku-config```
19
+
14
20
```
15
21
git init
16
22
git add .
17
23
git commit -m "react-create-app on Heroku"
18
- # make sure commit all codes and usuaully you do not need to run above command if you are sure your codes in git repo is latest.
19
- heroku create -b https://github.com/mars/create-react-app-buildpack.git
24
+ # make sure commit all codes and usually you do not need to run above command if you are sure your codes in git repo is latest.
25
+
26
+ heroku create
27
+ heroku buildpacks: add heroku/nodejs
28
+ heroku buildpacks: add https://github.com/mars/create-react-app-buildpack.git
29
+
20
30
# set variables defined in .env
21
- heroku config:set REACT_APP_API_BASE_PATH=base url
22
- heroku config:set REACT_APP_SOCKET_URL=socket url
23
- heroku config:set REACT_APP_AUTH0_CLIEND_ID=auth0 client id
24
- heroku config:set REACT_APP_AUTH0_DOMAIN=auth0 domain
25
- heroku config:set REACT_APP_GOOGLE_API_KEY=google api key
31
+ heroku config: push
32
+
26
33
git push heroku HEAD: master
27
34
heroku open
28
35
```
@@ -31,5 +38,4 @@ You can use new configuration with below commands from [set-vars-on-heroku](http
31
38
```
32
39
heroku config: set REACT_APP_API_BASE_PATH=new base url
33
40
git commit --allow-empty -m "Set REACT_APP_API_BASE_PATH config var"
34
- git push heroku HEAD:master
35
- ```
41
+ git push heroku HEAD: master ```
0 commit comments