File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,11 @@ Current can GET- ADD- DELETE todotask
16
16
1 . Set proxy, must to be a string in package.json file
17
17
18
18
2 . For example
19
- "proxy": "https://backend.example.com "
20
-
19
+ ``` json
20
+ {
21
+ "proxy" : " https://backend.example.com"
22
+ }
23
+ ```
21
24
3 . Run project
22
25
npm install && npm start || yarn install && yarn start
23
26
@@ -45,7 +48,7 @@ Set Proxy to deloy Heroku:
45
48
"origin" : " ${API_URL}"
46
49
}
47
50
}
48
- }<br/>
51
+ }
49
52
```
50
53
3 . Push file to heroku
51
54
git push heroku master
@@ -56,4 +59,6 @@ For example:<br/>
56
59
From react: axios.get("/api/search-items") → ${API_URL}/search-items <br />
57
60
From react: axios.get("/api/users/me") → ${API_URL}/users/me<br />
58
61
(!)Therefore, run this cmd to set proxy var in heroku: <br />
59
- heroku config: set API_URL="https://backend.example.com/api " <br />
62
+ ``` js
63
+ heroku config: set API_URL = " https://backend.example.com/api"
64
+ ```
You can’t perform that action at this time.
0 commit comments