Codebase

Navigate the Codebase using the tree view. Use the filters to highlight where various files are grouped to aid understanding.

Getting Started Commands

Project Structure

Below is a short description of the key directories of the project to aid you when understanding where key files are located.

app.js - The main file for the Express application, which sets up the server and routes.
bin/ - Contains scripts that can be executed directly, such as starting the application with node bin/www.
bin/www - Script to start the Express application using node and require("./app").
docker-compose.yml - Configuration file for Docker Compose, which manages the application's dependencies and services.
Dockerfile - Instructions for building a Docker image for the application.
nodemon.json - Configuration file for Nodemon, which automatically restarts the server when files change.
package.json - Manifest file for the Node.js project, which lists dependencies and scripts.
public/ - Static files that will be served directly by the Express application, like HTML, CSS, JavaScript, and images.
public/stylesheets/ - Subdirectory for storing CSS files.
public/stylesheets/style.css - The main stylesheet for the application.
routes/ - Subdirectory for defining the application's routes, which map URLs to specific handlers.
routes/index.js - Handles the routes for the homepage and other default pages.
routes/users.js - Handles the routes for user-related functionality.
views/ - Subdirectory for storing the application's templates, which are rendered as HTML responses.
views/error.hbs - Handlebars template for rendering error pages.
views/index.hbs - Handlebars template for rendering the homepage.
views/layout.hbs - Handlebars template for the application's layout, which is shared across multiple pages.

Entrypoints

Below are files we identified as entrypoints for to the codebase. This is where the application starts and a good place to start when learning.

app.js - This is the main entrypoint file for the Express.js application. It sets up the Express application, configures middleware, defines routes, and starts the server.
index.js - This file is the entrypoint for the user-facing part of the application. It requires and initializes the Express application instance created in `app.js`, sets up any additional middleware or routes specific to this file, and exports a default function that can be used as the Express application's main route handler.