- TypeScript 98.9%
- JavaScript 0.8%
- Dockerfile 0.3%
|
|
||
|---|---|---|
| .github/workflows | ||
| __tests__ | ||
| config | ||
| src | ||
| .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 | |
|---|---|---|
| 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:
-
Create a file named
.envin the root directory of this backend project (e.g., alongsidepackage.json). -
Add the following content to the
.envfile, making sure to replace the placeholder values in theDATABASE_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 theconfigpackage (used in this project) to load settings fromconfig/development.ts.- Other common values are
production(for deployed applications) andtest(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:3306for local MySQL).
-
.gitignore& Security: The.envfile is intentionally listed in the.gitignorefile. 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.envfile.