DEV Community

Discussion on: Step by step React, NodejS and MySQL Simple Full Stack Application 2018 (part: 5)

Collapse
 
xiaohan_du profile image
Xiaohan Du

Hi Maryam, thanks for the tutorial. What does it mean by bower install axios for using axios to frontend commands? I tried bower install axios and it said command not found. If I continue with npm start my React project, it gave the error Cannot read property 'map' of undefined, please help!

Collapse
 
alivadjid profile image
alivadjid

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 =)

Collapse
 
xiaohan_du profile image
Xiaohan Du

Hi, thanks for the reply, changed to app.get('/users', function(req, res) but still no luck