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

150
Vistas
How to link html/css/js web application to nodejs locally?

new to creating web applications, so please go easy on me.

I have a web application coded using html/css/js in a folder right now. On the other hand, I have a simple node.js file called server.js that is connected to my locally hosted mySQL database to perform some simple queries using Express.

I tried to connect the html/css/js files to the node.js file like how you would include a javascript file (using src = ...), but apparently it doesn't work since the browser does not support functions such as "require()" from nodejs.

Could anyone point me in the right direction for me to connect them so that my web application can perform some simple query using the nodejs file? All these are just for my local machine since I'm not going to host the web application

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

As you didn't provide any code I'm not sure what you want to do.

Assuming you want to use functionality from the node.js server:
You can't just require the node.js server. You need to run the server seperately by opening a command prompt and typing node server.js in the directory of your server files.
If you want to make queries you probably want to implement an API on your server and use the fetch() function in your browser to query data from the server.

For further help, please provide a screenshot of the folder with the files and upload all files using https://pastebin.com/.

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