I know how I can simply write a file using nodes File System. However, I have a simple HTML page with an input. I want to use javascript to get the value of the input submitted by a user and take this value and add it into the file written by node.
For example:
var fs = require('fs');
fs.writeFile('mynewfile3.txt', 'This is my text' + <VARIABLE>, function (err) {
if (err) throw err;
console.log('Replaced!');
});
Where is the value being pulled in from the javascript on the input.