At localhost: 3001 I see Express Welcome to Express, and at localhost: 3000 I see TypeError: Cannot read property 'map' of undefined, this happens at axios.get('/users')
.then((data) => {
console.log(data.data.users);
this.setState({ users: data.data.users });
})
.catch(error => console.log(error));
At localhost 3001 you must see data from your SQL database.
Something like this: "{"users":[{"id":1,"username":"Kris","surname": ..."
Can you send github repo for find issue?
Ok. what do you see at localhost: 3001? are there information from your SQL?
At localhost: 3001 I see
Express Welcome to Express
, and at localhost: 3000 I seeTypeError: Cannot read property 'map' of undefined
, this happens ataxios.get('/users')
.then((data) => {
console.log(data.data.users);
this.setState({ users: data.data.users });
})
.catch(error => console.log(error));
At localhost 3001 you must see data from your SQL database.
Something like this: "{"users":[{"id":1,"username":"Kris","surname": ..."
Can you send github repo for find issue?
Hi alivadjid,
Please see my repo
https://github.com/thinkvantagedu/HW10.git
Thank you
If I run
node server
in directorysimple-react-mysql
, I can see the data from my SQL database inlocalhost:3000
well, you shoud to restart lesson 4. From position 2 and install all components from lesson.