How to run javascript file with NodeJS on actual website after HTML form submit?

Viewed 29

I am new to NodeJS, and I was wondering how I can get data after I submit a form on a webpage and store it into my mysql database on the same website. I know how to make the form, I know how to use NodeJS to insert a row in the mysql database. What I don't know is how to connect the two. Most tutorials on NodeJS involve a local server (not a real website), and all of the tutorials use the terminal and command line to get the app running. Is there some way I can use the 'action=""' feature of the HTML form to POST data to my database using NodeJS? How? I am very lost.

0 Answers
Related