File tree 2 files changed +12
-15
lines changed
2 files changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -12,4 +12,4 @@ def hello_world():
12
12
13
13
14
14
if __name__ == '__main__' :
15
- app .run (debug = True )
15
+ app .run (port = 8080 , debug = True )
Original file line number Diff line number Diff line change 1
-
2
-
3
1
//remove this as you see fit
4
2
interface placeholder {
5
- hello : string
3
+ hello : string ;
6
4
}
7
5
8
6
async function query ( text : string ) : Promise < string > {
9
- const response = await fetch ( 'http://localhost:5000 /hello' , {
10
- method : 'POST' ,
11
- headers :{
12
- 'Content-Type' : 'application/json' ,
13
- } ,
14
- body : JSON . stringify ( text ) ,
15
- } ) ;
7
+ const response = await fetch ( 'http://localhost:8080 /hello' , {
8
+ method : 'POST' ,
9
+ headers : {
10
+ 'Content-Type' : 'application/json' ,
11
+ } ,
12
+ body : JSON . stringify ( text ) ,
13
+ } ) ;
16
14
17
- const data : placeholder = await response . json ( )
15
+ const data : placeholder = await response . json ( ) ;
18
16
19
- return data . hello ;
17
+ return data . hello ;
20
18
}
21
19
22
-
23
- export { query } ;
20
+ export { query } ;
You can’t perform that action at this time.
0 commit comments