I was used to python and migrated to nodejs in backend development
The extensions node-fetch and mysql are pretty similar in Docs I've been reading
I am so trying to store in a variable the rows I select from MySQL and from many different tries it is not reachable
Maybe it is a simple thing to do, so simple that many answers here do not tell how to do.
Documentations show how to console.log the res from select or even how to res.json() it but anywhere, any video or topic shows how can I put it to the front-end really. I use ejs to have rows in a table for example. And it is expecting variables I create in app.js using express to handle routes. It can show answers in template if I create variables and objects. But no way to take the results in rows to my frontend.
maybe it is because the content of the variable stands inside the scope of the function handling req,res and querying.