high school senior project archive
|
|
||
|---|---|---|
| .vscode | ||
| bin | ||
| database | ||
| public | ||
| routes | ||
| views | ||
| .env.example | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .gitpod.yml | ||
| .node-version | ||
| app.js | ||
| Dockerfile | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
Score Tracker
Main repository: https://gitlab.sudoer.ch/sudoer777/score-tracker/
A web app designed to collect and display scores for sports
Branches
- main - Stable, production-ready code
- testing - Nearly complete code being tested
- develop - Unstable code under development
Installation
This repository is designed to be pushed to Heroku/Dokku/etc.
Requirements
- PostgreSQL (with empty database created and an account to access it)
Environment Variables
NODE_ENV- set toproduction,testing, ordevelopmentPGHOST- set to your database URLPGPORT- set to the database portPGDATABASE- set to the name of your database (i.e.scoretrackerdb)PGUSER- set to the user for managing the databasePGPASSWORD- set to the password for that user
Code
This program uses Node.js/Express.js for the backend, PostgreSQL for the database (with node-postgres), and Passport.js for managing users and sessions.
Structure
databasefolder contains backend scripts for managing and storing data.mailfolder (currenly unused) contains backend scripts for sending emails.publicfolder contains publically accessible scripts and stylesheets for frontend.scriptsfolder contains scripts used by specific webpages.stylesheetsfolder contains CSS for various webpages.
routesfolder contains various routes used by the program.about.jsdirects to the about page (/about).auth.jsdeals with logging in and out (/auth/*).checkLoginStatus.jscontains functions for checking the login status of the current user.data.jssends various data to the client in JSON format (/data/*).index.jsdirects to the home page (/).manage.jscontains various functions that allows the user to add and edit items through the web browser (/manage/*).
viewsfolder contains pug templates for each webpage, and alayouttemplate for the base layout of each page..env.exampleis a template for the environment variables in a development workspace. Rename to.envand change values as needed.