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

149
Views
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 answers
Answer question

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 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!