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:
2024-07-17 22:29:04 +02:00
parent 305b8485e3
commit a3d9d07ead
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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 }),