I have a doubt, how i can make database queries

Hello everyone im new in this world and i have learnt how to make SQL querys. My doubt is: how can i print the result of a query in my web explorer ? I’m making a react application and I have a mysql database. Otherwise I have installed node in my server. I know how to make queries in the server side, but i want to send this queries when I load the page. For create a component with that data. Can anyone help me ? Thank’s

You can install the npm package named mysql and look through the documentation on how to connect and run queries to get data back which you can then parse and add as content to your web page.