This README describes how to install and customise this for individual use.
The following should be installed locally or globally using node.js
-
npm install morgan
-
npm install express
-
npm install fs
-
npm install path
-
npm install mysql
-
npm install express-basic-auth
-
npm install body-parser
-
(npm install morgan express fs path mysql express-basic-auth body-parser) - this will install all at the same time
-
It may be neccisary to run the following command in mySQL for version 8.0 + ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'
Usinging OpenSSL generate two files follow this guide to generate files.
openssl commands:
- openssl genrsa -out privatekey.pem 2048
- opensll req -x509 -new -key privatekey.pem -out certificate.pem
Any variables are stored in constants.js - to customise your application change this file to suit your needs.
Listener.js sets up a server either http, https or both. This can be configured within th constants.js file
app.js is used to handle any incomming requests via https and can be configured to use basic authentication as well as logging any incomming traffic
- Complete basic auth information from server for multiple users