Quizmaster is a standard Node.js + React application that can be deployed to any environment that supports Node.js. This guide covers building both applications for production, configuring the required environment variables, serving the frontend build, and using the included nixpacks configuration for one-click Railway deployments.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.
Set production environment variables
Before building or running either application, configure the environment variables for your production host. Set the following variables in your hosting environment or in a.env file that is not committed to version control:
.env
Build and run
Build the backend
Compile the TypeScript source to JavaScript:This runs
tsc and outputs compiled files to the dist/ directory.Run the compiled backend
Start the backend using the compiled output:The API will listen on the port defined by the
PORT environment variable (default: 5000).Build the frontend
In a separate step, build the React frontend for production:This runs
react-scripts build and outputs optimized static files to the build/ directory.Point the frontend at your production API
Before building (or as a host environment variable), set If this variable is not set, the frontend defaults to
REACT_APP_API_URL to your production backend URL:http://localhost:5000/api.Deploy to Railway with nixpacks
The backend includes anixpacks.toml configuration file, which means Railway can detect and build the backend automatically without any additional configuration.
To deploy to Railway:
- Push your repository to GitHub.
- Create a new Railway project and connect your repository.
- Set the environment variables listed above in the Railway dashboard under Variables.
- Railway will use
nixpacks.tomlto build and start the backend automatically.
frontend/build/ output to Railway’s static hosting, Vercel, Netlify, or any CDN. Set REACT_APP_API_URL to your Railway backend URL before building.