On my site, I have embedded mailto links in the code. Since I want to learn some backend, and also don't want to recieve too much spam (even though it hasn't happened yet), I am going to replace those with an in-house solution. My university student counselour utilises a contact form system that let's you input your own email address, content and then essentially send it from your own email address that you entered without actually using your standard email client which this address is bound to. I figured this would be possible through usage of Nodemailer. Correct me if I'm wrong. Also screw PHP.
Actually implementing Nodemailer or another contact form solution isn't first to be done though. To prevent spambots from taking advantage of the system, I am in process of implementing the Recaptcha widget into the form. Front-end has been successfully implemented onto the domain, ableit currently disabled. As for backend, I found one decent tutorial for server-client implementation using Nodejs, others utilised PHP (did I mention screw PHP?).
Unfortunately it was not a very good tutorial unless you've done some Nodejs before. Although I know what a lot of the code does, I am slightly clueless about some bits in the code.
Basically his site is a single-page app, mine is not and rebuilding it into that is currently not a priority. First point of confusion is 5:07. I am going to implement my form into the pages index.html, about.html and work.html, or all three pages on my site, which is why I need flexible code. Due to the backend script, the node packages and the front-end scripts being in a sub-folder (/js), I also need to use this syntax which further complicates things:
res.sendFile(path.join(__dirname + '/../index.html'));
Next part that confuses me is 7:31. So if I am correct, "/subscribe" in his case is a subdirectory where the output JSON files are placed, but he never explained that properly.
Last is 18:50, but that is basically the same question as above.
No problems with installing Node or the required modules though.
The unfinished site is located on this domain: http://beta.saddexproductions.com. Function is launched with the "email me"-button at the bottom of the page.
The front-end script is located at http://beta.saddexproductions.com/js/lang.js. Ctrl+F:
$(document.body).on('mousedown','#send', function(e){
The back-end script is located at http://beta.saddexproductions.com/js/server.js. This is just a dummy script, with the private key removed. The rest of the code is the same as in the true script.