Skip to content

Commit b9f1c55

Browse files
committed
change port to 8080 for compatibility
1 parent b629864 commit b9f1c55

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

backend/app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ def hello_world():
1212

1313

1414
if __name__ == '__main__':
15-
app.run(debug=True)
15+
app.run(port=8080, debug=True)

frontend/app/api/chatAPI/api.ts

+11-14
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
1-
2-
31
//remove this as you see fit
42
interface placeholder {
5-
hello: string
3+
hello: string;
64
}
75

86
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+
});
1614

17-
const data: placeholder = await response.json()
15+
const data: placeholder = await response.json();
1816

19-
return data.hello;
17+
return data.hello;
2018
}
2119

22-
23-
export { query };
20+
export { query };

0 commit comments

Comments
 (0)