Quiz answer form
This project allows quiz participants to easily answer the questions on their mobile devices.
Just share the site URL and the answers can be tracked in real time with scoreboard information for the organizer.
- Download and build the website
# Fetch repository git clone https://github.com/Carlgo11/Quiz cd Quiz # Install dependencies npm i # Build website npx @cloudflare/next-on-pages@1
This project is meant to be hosting on a Next.js hosting services such as Vercel or Cloudflare Pages. Below is information for how to set up on the different alternatives.
- Set up and deploy the project
- Go to the Vercel Dashboard and Add New... > Project.
- Import your git fork of this project.
- When asked for environment variables, enter the variables listed in API Variables.
- Save and wait for Vercel to build your website.
- If the build was successful, you should get a vercel.app subdomain for the project. To use your own domain, simply point a CNAME record to that vercel.app subdomain.
Note To set up your API server, go to Quiz-API.
Warning Hosting this project on Cloudflare Pages currently does not work. This is due to Cloudflare not supporting the cache property for the Fetch API.
-
Set up the project
- Open your Cloudflare dashboard.
- Go to Workers & Pages and Create application.
- Go to the Settings tab for your Pages application>Environment variables>Production>Edit variables and enter
the variables listed in API Variables.
Note To set up your API server, go to Quiz-API.
-
Deploy the website
# Publish website to Cloudflare Pages wrangler pages deploy .vercel/output/static
Name | Content | Example | Required |
---|---|---|---|
NEXT_PUBLIC_API | Your API URL | https://quiz-7ff.pages.dev/api |
Yes |
NEXT_PUBLIC_LANGUAGE | en or sv |
en |
No |
The project is licensed under GPLv3. See the full license here.