Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

207
Views
Why python server not able to receive and send messages?

I have a chatbot in python and want to integrate it to my react website. I am getting the following error while sending data to python server at localhost:/5000 from localhost:/3000:

 Could not proxy request /js/jquery-1.11.0.min.js from localhost:3000 to http://localhost:5000/.

The code for my python and js file:

from flask import Flask
app=Flask(__name__)

@app.route("/members")
def members():
    return {"members":["Member1","Member2","Member3"]}

if __name__=="__main__":
    app.run(debug=True)

The message file:

import axios from 'axios'
import './Message.css';
import React, {useState,useEffect} from 'react';
const Message=()=>
{
    // state ={
    //     chat:[],
    //     msg:''
    // }
    const [chat,setChat]=useState(["hellos zdfgzsdfgsfdg","dfgsdfgsdfgsdfgsdfgs","sdfgsdfgsdfgsdfgsdfgsdfg"]);
    const [msg,setMsg]=useState("");
    const[data,setData]=useState([{}])

    useEffect(()=>{
        fetch("/members").then(
            res=>res.json()
        ).then(
            data=>{
                setData(data)
                console.log(data)
            }
        )
    },[])
    return(
            <div  >
                
            </div>
        )
    
}
export default Message;
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

axios.get(`${process.env.REACT_APP_API}/members`).then(.......

REACT_APP_API='http://localhost:8000' for example

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!