Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

237
Views
How do I show the data from a sql table into a html element in nodeJs?

I am not looking for a piece of code to copy- I am stuck. I used the MySQL driver in node to connect to the SQL database and inserted data into the table. It works fine, but I want to show the data from that table into HTML. I would use client-side js to do something like someDiv.textContent = results but client side doesn't allow me to connect to the database. I could create an endpoint for /showPosts and have it connect to the database but I don't know how I'm going to pass the results I get to the frontend. Any help would be appreciated. Thanks :)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In your frontend client, you cant use the fetch api or something like axios to do a GET request to obtain data from your /showPosts endpoint. Then you can display that data on the client side.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!