2025-nodejs-gent8 created by GitHub Classroom
  • TypeScript 98.9%
  • JavaScript 0.8%
  • Dockerfile 0.3%
Find a file
2025-06-24 00:08:19 +02:00
.github/workflows
__tests__ allow responsible to edit own site 2025-06-23 14:14:34 +02:00
config
src allow responsible to edit own site 2025-06-23 14:14:34 +02:00
.editorconfig
.gitattributes
.gitignore
.yarnrc.yml
Dockerfile
eslint.config.mjs
jest.config.ts
package.json
README.md
swagger.config.ts
tsconfig.json
yarn.lock

SDP2 - Node.js Gent Groep 8

Groepsleden

Git gebruikersnaam Naam Email
dencall Deniz Callens deniz.callens@student.hogent.be
maxeAdams Maxe Adams maxe.adams@student.hogent.be
Alex-Emanuel Alex Emanuel alex.emanuel@student.hogent.be
BrittEmanuel2001 Britt Emanuel britt.emanuel@student.hogent.be
Milly-HoGent Emilia Daelman emilia.daelman@student.hogent.be

Environment Configuration (.env)

This backend application relies on environment variables for crucial configuration settings, such as the runtime mode and database connection details. These variables should be defined in a .env file.

Instructions:

  1. Create a file named .env in the root directory of this backend project (e.g., alongside package.json).

  2. Add the following content to the .env file, making sure to replace the placeholder values in the DATABASE_URL:

    # Specifies the runtime environment (development, production, test)
    NODE_ENV=development
    
    # Database connection string (MySQL example)
    DATABASE_URL="mysql://<username>:<password>@localhost:3306/<schema name>?serverTimezone=UTC"
    

Explanation:

  • NODE_ENV: This variable sets the application's operating mode.

    • development: Typically used for local development. This often enables more verbose logging, disables certain optimizations, and might cause the config package (used in this project) to load settings from config/development.ts.
    • Other common values are production (for deployed applications) and test (for running automated tests).
  • DATABASE_URL: This is the connection string used by Prisma to connect to your database.

    • The example provided is for MySQL. If you are using a different database (like PostgreSQL or SQLite), the format will differ. Consult the Prisma documentation for the correct format for your database.
    • ---> IMPORTANT <---: You must replace the placeholders:
      • <username>: Your actual MySQL database username.
      • <password>: Your MySQL database user's password.
      • <schema name>: The name of the specific database/schema you created for this application (e.g., budget_app_dev).
    • Ensure your database server (e.g., MySQL) is running and accessible (typically at localhost:3306 for local MySQL).
  • .gitignore & Security: The .env file is intentionally listed in the .gitignore file. It should never be committed to version control (like Git) because it contains sensitive information like database credentials. Each developer sets up their own local .env file.