#๐ Help Needed: Connecting Dockerized Backend (Flask app) to Vercel-Hosted Next.js Frontend
12 messages ยท Page 1 of 1 (latest)
@daring forge
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Help Needed๐ฅบ: Connecting Dockerized Backend (Flask app) to Vercel-Hosted Next.js Frontend
You don't need cors
Cors is for multiple organizations who need to connect to each other
alright but i need help to modify some of my backend files in order to acept api calls from the frontend
right now its all connected to the fronend like this below
@chat_bp.route('/chatbot')
def chatbot():
user_id = create_user_id()
redis_client.set(f"session_user:{user_id}", user_id)
is_rate_limited, time_remaining = track_user_requests(user_id, redis_client)
if is_rate_limited:
return redirect(url_for('main.rate_limit_exceeded', time_remaining=int(time_remaining)))
if 'user_location' not in session:
return redirect(url_for('location.location_permission'))
return render_template('try.html')
@chat_bp.route('/chat', methods=['POST'])
def chat():
"""Handle user chat messages and return responses."""
user_message = request.json.get('message')
history = session.get('history', [])
logging.debug(f"User message received: {user_message}")
# Correct the spelling of the user message
corrected_message = correct_spelling(user_message)
logging.debug(f"Corrected user message: {corrected_message}")
Use Amazon to serve both servers on the same domain and port
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.
๐ Help Needed๐ฅบ: Connecting Dockerized Backend (Flask app) to Vercel-Hosted Next.js Frontend
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.