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

146
Views
Is there a way to update HTML dom everytime a node script is run

Every time a node script is run node app.js I need to update a list in the frontend, but it is not possible to manipulate DOM through node.

in HTML, I want to append children option tags to this

<body>
    <select name="endpoints" id="endpoints"></select>
  </body>

and on server side I came up with this

var endpointDropdown = document.getElementById("endpoints");

endpoints.forEach(function (item) {
  let option = document.createElement("option");
  endpointDropdown.appendChild(option);
  option.innerHTML += item;
});

Every time I run the node script, an array is generated with the required items which I want to display on the frontend. Is there anyway so when I run the script, it passes the array to the js file and then updates the html?

about 4 years ago · Juan Pablo Isaza
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!