1
Good afternoon! I’m having some problems with NODEJS using a Mysql database, I’ve made several attempts and I’m not sure how to solve this problem. My problem is that I would like to consume the data return from a SELECT table in the back end but I’m not getting it. I can print the information on the screen using Insomnia (Postman) but I can’t bring the information to the backend and use it.
Query I am using to query in the database (note that in this layer I already do console.log but later will return 'Undefined')
Database settings (hidden but working correctly) and the function to execute the query, on this screen I ask to print in JSON information and it returns normal.
Feedback on the Front-End screen, ok
Console information.log I asked to print in the back end earlier, already returns me UNDEFINED
When I ask to print the variable 'res', just show me all this information
Well, I hope you can help me, thank you very much!
I don’t understand what you want me to do? What I expect?
– novic
I wish I could at the backend layer, be able to handle the result of the query, but I’m not able to bring it because it returns Undefined
– Airton Dambrovski
you are wanting to bring the result of database return so that you can view in the console this data?
– novic
Yeah, that’s right, that’s right
– Airton Dambrovski