Having understood the setup of the BasicSite , the following setup proposed here is a project called 'stack': a 3-4 page ExpressJS website with a contact page but also has private pages. This setup can first on the PC then to have the same site established on the server (running iRedmail/Nginx - see PartB) with the ability to have the two sites (one on the PC, the other on the virtual server) synchronized via FTP (eg. FileZilla)
Part A: Creating the Node.js/ExpressJS Environment on the PC
Step1: Install Node.js on a PC (Windows)
Following this link: Node.js and install the version:16.13.0 LTS 64-bit version. Afterwards, it would be useful to continue here using the commands below via 'PowerShell'[Win10] or in Win 7+, typing in 'cmd' after opening the Windows Start button:
Following the above, open the 'package.json' file with your text editor and replace all lines from below "description" with the following text package_json-partial.txt and save:
Step 2: Install a ExpressJS App
To install the remaining parts of app called 'stack' download this zipped folder: stack.zip and place it in the 'js' folder -- and unzipped it. New folders/files will appear in the existing 'stack' folder
In the Powershell, enter the 'slack' directory and type the following:
If all has gone well, one should find a 'Welcome' webpage and to login, use email: email@example.com, password: 'password'
Characteristics of 'Stack'
i. A good Youtube tutorial set by Travesy Media, start with Crash Course on Express.js
and another set by Zach Gollwitzer: What is Express Middleware finally these by DevSprout: How to Pass Data Through Middleware in Express JS
ii. Nodemailer: Quick start with Nodemailer
iii. Eta Template: Go to the source website for the best references/tutorials
iv. A modern and responsive CSS, w3.css - by W3-Schools - a stylesheet used in this demo.