- npm + nodejs runtime
- openssl
- tree
- pm2
- sqlite3
- bcrypt
Express
webserver framework for node.jsHelmet
secure http headersBodyparser
parse incoming data and make it available underreq.body
propertyip
IP address utilities for node.jsPassport*
Authentication modulesExpress-session
carry session throughout client connection
- clone repo
- change '.env-example' into '.env'
- update .env file and replace all values with own 'complex' strings
cd ./api/utils
node genKey.js
npm run certs
npm install --save
node initDB.js
node server.js
visit http(s)://[localhost]:[port]/
npm install pm2 -g
..then inside ldserver2's root directory
pm2 start server.js --name 'helloWorld'
pm2 ls
Shows running processespm2 monit
Monitor processespm2 delete [id|name]
kill the daemon ie. pm2 delete 0 or pm2 delete helloWorldpm2 --help
for all commandline optionspm2 start server.js --watch
Restarts server on source changes (development)pm2 stop [id|name] --watch
Stops restarting on source changescat ./bin/pm2-status.sh
Quick guide
git pull
This will update local repo to latest version
-
create-certs.sh
This script creates and places cert + key into your application this requires openssl -
tree.sh
A script to show the output as a visual formatted tree on server startups -
pm2-status.sh
A script, but really a documentation to daemonize the webserver -
ip.js
&local_ip.sh
A script to retrieve and set localip automatically -
log.js
&tree.sh
A script to give fancy info when starting up the server