/canteen

Simple webapp for managing peoples accounts for a simple store front like you would find at a summer camp.

Primary LanguageJavaScriptMIT LicenseMIT

Canteen App

Simple app for keeping track of people and how much money they have left to spend. The app is written in Node.js and uses Postgresql for persistant storage.

Features

Themes

The code includes several Bootstrap themes from bootswatch.com. You can dynamically change the active theme by

Installed themes include:

Hosts

Stack Setup

  • Uses PM2 and repo stored ecosystem.config.js
  • Uses Lets Encrypt to make sure the connection is SSL (HTTPS)
    • Uses cron for renewing cert
  • Uses locally installed Postgresql server

LightSail Initialization Script

sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
sudo -u postgres createuser -s dbadmin
sudo -u postgres -H -- psql -d postgres -c "ALTER USER dbadmin WITH PASSWORD '<admin_password>'"
sudo -u postgres createuser --createdb canteen
sudo -u postgres -H -- psql -d postgres -c "ALTER USER canteen WITH PASSWORD '<password>'"
sudo -u postgres createdb --owner=canteen canteen