An interactive, multiplayer quizz website powered by Angular and Node.
git clone git@github.com:Nathn/MasterQuizz.git
cd MasterQuizz
npm install --include=dev --legacy-peer-deps
This will install both frontend and backend dependencies, including:
Edit frontend/environments/environment.ts to add Firebase credentials. These should have Google authentification set up in your console. If you plan to run a production server, duplicate the environment.ts file into a new environment.prod.ts with production credentials, a reliable encryptionKey and production set to true. You can also have a environment.prodhttp.ts if you want to support http:// in production.
Create backend/.env to the following :
PORT=3000
WS_PORT=3001
MONGO_URI=mongodb+srv://<username>:<password>@<domain>/masterquizz
CORS_WHITELIST=http://localhost:3000,http://localhost:8080
ENCRYPTION_KEY=YOUR_ENCRYPTION_KEY
You can get a MONGO_URI by creating a new project on MongoDB Atlas.
Run npm run dev for a development frontend+backend. Navigate to http://localhost:8080/. The application will automatically reload if you change any of the source files.
Run npm run prod to build the project and start the server in production conditions, then navigate to http://localhost:3000/. The build artifacts will be stored in the dist/ directory.
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.