Fixat fel under preflight genom att byta till fort 5005. MacOS tycks använda port 5000 och 7000 till sitt "control centre"
This commit is contained in:
@@ -60,7 +60,7 @@ def get_response(user_query):
|
||||
|
||||
def run_flask():
|
||||
# Flask endpoint for user interaction
|
||||
app.run(port=5000, debug=True)
|
||||
app.run(port=5005, debug=True)
|
||||
# app.run(port=5000, debug=True, use_reloader=False)
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ function sendMessage() {
|
||||
// Check if the message is not empty
|
||||
if (message !== '') {
|
||||
// Send a POST request to the /api/chat endpoint with the message
|
||||
fetch('http://localhost:5000/api/chat', {
|
||||
fetch('http://localhost:5005/api/chat', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ message }),
|
||||
|
||||
Reference in New Issue
Block a user