Sunday, 9 February 2020

How do you communicate with node using buttons / event listeners in a web page?

I'm new to node and completely disoriented.I have a web page and a local server:index.htmlstyle.csscode.js (contains a few event listeners for my web page)server.js (this is just NPM-Free-Server)and I can run:node server.js to see my web page at: localhost:8000But I have no idea how to communicate with my server using the buttons / event listeners in my web page.For example: how do you get node to do something like read or update the file system when an event listener fires? I know I need to be sending node a request, but I'm not sure how this is done.Please can someone point me in the right direction so I can learn the proper method / approach.

Submitted February 09, 2020 at 08:44PM by thermiteunderpants

No comments:

Post a Comment