File tree 2 files changed +9
-12
lines changed
2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,6 @@ export const sentJump = async (
7
7
url : string ,
8
8
data : Jump
9
9
) : Promise < ResponseBack > => {
10
- // Define Axios Instance
11
- const instance : AxiosInstance = axios . create ( {
12
- httpsAgent : new https . Agent ( {
13
- rejectUnauthorized : false ,
14
- } ) ,
15
- } ) ;
16
-
17
10
// Define options with headers
18
11
const options = {
19
12
headers : {
@@ -25,7 +18,7 @@ export const sentJump = async (
25
18
// Execute Post
26
19
try {
27
20
let response : any ;
28
- response = await instance . post ( url , JSON . stringify ( data ) , options ) ;
21
+ response = await axios . post ( url , JSON . stringify ( data ) , options ) ;
29
22
return response . data ;
30
23
} catch ( error ) {
31
24
console . log ( error ) ;
Original file line number Diff line number Diff line change @@ -12,23 +12,27 @@ const cx = bind(styles);
12
12
interface Props { }
13
13
14
14
export const Home : React . FunctionComponent < Props > = ( ) => {
15
- const appBack = process . env . REACT_APP_BACK + '' ;
15
+ const appBack = process . env . REACT_APP_BACK || '' ;
16
+ const appGolang = process . env . REACT_APP_GOLANG || 'http://golang:8442' ;
17
+ const appSpringboot =
18
+ process . env . REACT_APP_SPRINGBOOT || 'http://springboot:8443' ;
19
+ const appPython = process . env . REACT_APP_PYTHON || 'http://python:8444' ;
16
20
17
21
const golang = {
18
22
id : '1' ,
19
- jump : 'http://golang:8442' ,
23
+ jump : appGolang ,
20
24
name : 'Golang' ,
21
25
img : './golang.png' ,
22
26
} ;
23
27
const springboot = {
24
28
id : '2' ,
25
- jump : 'http://springboot:8443' ,
29
+ jump : appSpringboot ,
26
30
name : 'Springboot' ,
27
31
img : './springboot.png' ,
28
32
} ;
29
33
const python = {
30
34
id : '3' ,
31
- jump : 'http://python:5000' ,
35
+ jump : appPython ,
32
36
name : 'Python' ,
33
37
img : './python.png' ,
34
38
} ;
You can’t perform that action at this time.
0 commit comments