I have a button in HTML:
<button id="save" type="button" onclick="save()">Save</button>
and in javascript I want it to run something in node.js, something that's not client side.
So something like this is what I am looking for:
function save() {
//run script from server
}
And if this script MUST be ran as if I was typing node script.js
The reason the script has to be ran as if I was typing it was because it's saving a file to the node.js server, a json to be exact, and that file must be on the node.js server for my application.