Skip to content

Commit 285cf8f

Browse files
committed
update readme
1 parent 9593873 commit 285cf8f

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Set Proxy to deloy Heroku:
2727
npm install || yarn install
2828

2929
2. Create static.json file
30+
```json
3031
{
3132
"root": "build/",
3233
"clean_urls": false,
@@ -44,15 +45,15 @@ Set Proxy to deloy Heroku:
4445
"origin": "${API_URL}"
4546
}
4647
}
47-
}
48-
48+
}<br/>
49+
```
4950
3. Push file to heroku
5051
git push heroku master
5152

5253
4. Config proxy heroku
53-
All request from react contain "/api/abc" -> "/abc"
54-
For example:
55-
From react: axios.get("/api/search-items") → ${API_URL}/search-items
56-
From react: axios.get("/api/users/me") → ${API_URL}/users/me
57-
(!)Therefore, run this cmd to set proxy var in heroku:
58-
heroku config:set API_URL="https://backend.example.com/api"
54+
All request from react contain "/api/abc" -> "/abc" <br/>
55+
For example:<br/>
56+
From react: axios.get("/api/search-items") → ${API_URL}/search-items <br/>
57+
From react: axios.get("/api/users/me") → ${API_URL}/users/me<br/>
58+
(!)Therefore, run this cmd to set proxy var in heroku: <br/>
59+
heroku config:set API_URL="https://backend.example.com/api" <br/>

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
"react-redux": "^7.2.1",
1414
"react-scripts": "3.4.3",
1515
"redux": "^4.0.5",
16-
"redux-thunk": "^2.3.0",
17-
"uuid": "^8.3.0"
16+
"redux-thunk": "^2.3.0"
1817
},
1918
"scripts": {
2019
"start": "react-scripts start",
@@ -38,4 +37,4 @@
3837
]
3938
},
4039
"proxy": "https://vhk-services-api.herokuapp.com/"
41-
}
40+
}

0 commit comments

Comments
 (0)