File tree 2 files changed +8
-1
lines changed
Track 4_ReactJS_Web Development/Project/Frontend/hrc-dashboard
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,6 @@ HOST = 0.0.0.0
2
2
PORT = 4848
3
3
REACT_APP_API_SERVER = 192.168.0.134
4
4
REACT_APP_API_SERVER_PORT = 280
5
+ REACT_APP_FLASK_SERVER = 192.168.0.134
6
+ REACT_APP_FLASK_SERVER_PORT = 5000
5
7
GITHUB_SECRET = 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
Original file line number Diff line number Diff line change 1
1
import { post } from 'axios' ;
2
2
3
+ const { REACT_APP_FLASK_SERVER , REACT_APP_FLASK_SERVER_PORT } = process . env ;
4
+
3
5
const doPrediction = async ( payload ) => {
6
+ const URL = `http://${ REACT_APP_FLASK_SERVER || '192.168.0.134' } :${
7
+ REACT_APP_FLASK_SERVER_PORT || '5000'
8
+ } `;
4
9
try {
5
- const { status, data } = await post ( ' http://192.168.0.134:5000 /get_prediction' , {
10
+ const { status, data } = await post ( ` http://${ URL } /get_prediction` , {
6
11
data : payload ,
7
12
} ) ;
8
13
You can’t perform that action at this time.
0 commit comments