In this article I try to solve bugs of project, upload it on Github.
probably after running the project you will see nothing on the browser and wi...
For further actions, you may consider blocking this person and/or reporting abuse
I think my problem is in here: Then use npm install axios for backend and bower install axios for using axios to frontend commands in terminal to access axios and use it., can you add some explanation of where to install for backend and where to install for frontend, and where to start the servers please?
Sorry. I had a problem in this lesson. After add CORS,and modified app.js.
For your problem.
"Then use npm install axios for backend"----- I wrote: npm install axios. At the terminal in vusual studio.
"and bower install axios for using axios to frontend commands in terminal to access axios and use it".------Wrote "bower install axios" at GitBash =) After this command must appeare "bower_components" folder in /express-react/backend/client/src
Try this
Appreciate that. I follow what you said: changed to
app.get('/users', function(req, res)
, installed axios in /express-react/backend/client/src and saw bower_components in /express-react/backend/client/src, but still see the same error:TypeError: Cannot read property 'map' of undefined
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.
Hi Maryam, thanks for the tutorial. What does it mean by
bower install axios for using axios to frontend commands
? I triedbower install axios
and it said command not found. If I continue withnpm start
my React project, it gave the errorCannot read property 'map' of undefined
, please help!Good day!
Try at html-routes.js file change line: app.get('/', function(req, res)
to
app.get('/users', function(req, res)
and then project must work.
I think that connected with express method app.get. Which mounted middleware function on the /users.
And than App.js on client folder refer to it.
If I'm wrong, please correct me =)
Hi, thanks for the reply, changed to
app.get('/users', function(req, res)
but still no luckHello Maryam.
Where are part 6 ?
Hi, I'll write it as soon as possible sorry for delay. :)
Olá Maryam.
Please!
I am using as base your tutorial, to develop an application, but I lack base for connecting with the FrontEnd.
For this I need part 6 of the tutorial
Thank you.
Very rewarding your work.
Where are parts 1-4?
I just wrote 5 part Continuously
dev.to/kmaryam27/step-by-step-reac...
dev.to/kmaryam27/step-by-step-reac...
dev.to/kmaryam27/step-by-step-reac...
dev.to/kmaryam27/step-by-step-reac...
Thanks for the series, Maryam.
When you add the series meta tag, it will show the series on the top of the list.
As an example, check out this post.
Graph Theory — BaseCS Video Series
Vaidehi Joshi
You will see series bubble as shown below.
Check out the Editor Guide for detail 🙂
Thanks a lot I'll use it :)
Hello,
I'd like to ask if you're gonna make a tutorial for the frontend with integration of frontend and backend?
Thank you :)
Hi, yes I'm trying to do front-end app