Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/geeky-hamster/Quizmaster/llms.txt

Use this file to discover all available pages before exploring further.

Quizmaster uses environment variables to configure the server port, database connection, authentication secrets, and the frontend API URL. Copy the example below into a .env file at the root of the backend directory and fill in your values before starting the application.
.env
DB_HOST=your-mysql-host
DB_PORT=3306
DB_NAME=quizmaster
DB_USER=root
DB_PASSWORD=your-password
JWT_SECRET=your-jwt-secret
PORT=5000

Backend variables

PORT
number
default:"5000"
The port the Express server listens on.
DB_HOST
string
Hostname or IP address of your MySQL server.
DB_PORT
number
default:"3306"
TCP port of your MySQL server.
DB_NAME
string
default:"quizmaster"
Name of the MySQL database Quizmaster will connect to.
DB_USER
string
default:"root"
MySQL user with read/write access to the database.
DB_PASSWORD
string
Password for the MySQL user.
JWT_SECRET
string
required
Secret key used to sign and verify JSON Web Tokens. Must be a long, random string in production.
JWT_SECRET is required for production security. If it is weak or exposed, attackers can forge authentication tokens and gain unauthorized access to any account. Use a randomly generated string of at least 32 characters and never commit it to version control.
MYSQL_URL
string
Full MySQL connection string (e.g. mysql://user:password@host:3306/quizmaster). When set, this takes precedence over all individual DB_* variables. DATABASE_URL is accepted as an alias.
If both MYSQL_URL (or DATABASE_URL) and individual DB_* variables are present, the connection string is used and the individual variables are ignored.

Frontend variable

REACT_APP_API_URL
string
default:"http://localhost:5000/api"
Base URL the React frontend uses to reach the backend API. Override this when deploying the frontend to a different host or when the backend runs on a non-default port.

Build docs developers (and LLMs) love