Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

140
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda