Updates to file structure

This commit is contained in:
Lucas Patenaude
2024-04-30 22:12:59 -06:00
parent 289e7641b4
commit bd79a6ccc3
71 changed files with 14 additions and 14 deletions

View File

@@ -16,8 +16,8 @@ services:
ports:
- '5432:5432'
volumes:
- group-project:/var/lib/postgresql/data
- ./init_data:/docker-entrypoint-initdb.d
- users-database:/var/lib/postgresql/data
- ./public/init_data:/docker-entrypoint-initdb.d
web:
container_name: node-web-interface
image: node:lts
@@ -35,4 +35,4 @@ services:
- ./node_modules:/home/node/app/node_modules # Mount node_modules directory
command: 'npm run start'
volumes:
group-project:
users-database:

View File

@@ -21,8 +21,8 @@ const moment = require('moment'); // To extract current time data
// create `ExpressHandlebars` instance and configure the layouts and partials dir.
const hbs = handlebars.create({
extname: 'hbs',
layoutsDir: __dirname + '/client/src/views/layouts',
partialsDir: __dirname + '/client/src/views/partials',
layoutsDir: __dirname + '/src/views/layouts',
partialsDir: __dirname + '/src/views/partials',
});
// database configuration
@@ -53,7 +53,7 @@ db.connect()
// Register `hbs` as our view engine using its bound `engine()` function.
app.engine('hbs', hbs.engine);
app.set('view engine', 'hbs');
app.set('views', path.join(__dirname, '/client/src/views'));
app.set('views', path.join(__dirname, '/src/views'));
app.use(bodyParser.json()); // specify the usage of JSON for parsing request body.
// initialize session variables
@@ -88,26 +88,26 @@ app.use(async function(req, res, next) {
});
// Serve static files from the 'public' directory
app.use(express.static(path.join(__dirname, '/client/src/assets')));
app.use(express.static(path.join(__dirname, '/src/assets')));
// *****************************************************
// <!-- Section 4 : Middleware -->
// *****************************************************
// Middleware to automatically update live scoreboard
const fetchMatchesData = require('./client/src/assets/middleware/navigation-bar/current-match-information');
const fetchMatchesData = require('./src/assets/middleware/navigation-bar/current-match-information');
app.use(fetchMatchesData);
//Middleware to automatically update in-game time abbreviations
const convert_time = require('./client/src/assets/middleware/navigation-bar/convert-time');
const convert_time = require('./src/assets/middleware/navigation-bar/convert-time');
app.use(convert_time);
// Leagues Page Middleware
const fetchLeaguesData = require('./client/src/assets/middleware/leagues-page/get-current-league-information');
const fetchLeagueScorerData = require('./client/src/assets/middleware/leagues-page/get-current-league-top-scorers');
const fetchLeaguesData = require('./src/assets/middleware/leagues-page/get-current-league-information');
const fetchLeagueScorerData = require('./src/assets/middleware/leagues-page/get-current-league-top-scorers');
app.get('/league/:leagueID', [fetchLeaguesData, fetchLeagueScorerData], (req, res) => {
// Render the Handlebars view with league data
@@ -120,7 +120,7 @@ app.get('/league/:leagueID', [fetchLeaguesData, fetchLeagueScorerData], (req, re
// Clubs Page Middleware
const fetchClubsData = require('./client/src/assets/middleware/clubs-page/get-current-club-information');
const fetchClubsData = require('./src/assets/middleware/clubs-page/get-current-club-information');
app.get('/club/:clubID', [fetchClubsData], (req, res) => {
// Render the Handlebars view with league data
@@ -264,7 +264,7 @@ app.get('/logout', (req, res) => {
*************************/
// Import and call generateLeagueRoutes function
const generateLeagueRoutes = require('./client/src/assets/routes/league-pages/generate-league-routes');
const generateLeagueRoutes = require('./src/assets/routes/league-pages/generate-league-routes');
generateLeagueRoutes(app);
/************************
@@ -272,7 +272,7 @@ generateLeagueRoutes(app);
*************************/
// Import and call generateLeagueRoutes function
const generateClubRoutes = require('./client/src/assets/routes/club-pages/generate-club-routes');
const generateClubRoutes = require('./src/assets/routes/club-pages/generate-club-routes');
generateClubRoutes(app);
/************************

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 127 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB