Created by Alex for the FBLA Coding and Programming 2020-2021 Competition.
This project was bootstrapped with Create React App.
- Install MySQL - For a detailed tutorial on installing MySQL read the questionCompiler README
- Create a database called questions
- Create a table in the questions database. Use the exact table in
src/database/questionSchema.sql - Either:
- Query the default questions in
src/database/insertQuestions.sql - Add custom questions by modifying the config.js file's questions field and adding custom questions. Two examples of how the format should look are provided. To query the custom questions navigate to
src/database/questionCompiler/compiler.jsand runnode compiler.js.
- Query the default questions in
- In
src/database/questionCompiler/config.jschange the host, user, password, and database fields to have the correct information. You should only need to change the password field. - Install the node modules with
npm install - Start the backend server
nodemon server.jsIf you run into the errorClient does not support authentication protocol requested by server; consider upgrading MySQL clientrefer to https://stackoverflow.com/a/50131831. To make sure the server is running go tohttp://localhost:5000/questions. There should be no connection issues and you should see the questions in JSON form. - Either:
- Start the app in development mode
npm start - Build the app for production
npm run build
- Start the app in development mode
Note: The questions API uses port 5000. If you are using a Mac make sure that AirPlay Receiver is unticked in System Preferences > Sharing > AirPlay Reveiver as it uses the same port.
Library's used:
Bootstrap: https://getbootstrap.com/
Google fonts: https://fonts.google.com/
React: https://reactjs.org/
Node-cron: https://www.npmjs.com/package/cron
Express: https://www.npmjs.com/package/express
Cors: https://www.npmjs.com/package/cors
MySql: https://www.npmjs.com/package/mysql
mysqldump: https://www.npmjs.com/package/mysqldump
readline: https://www.npmjs.com/package/readline
react-toastify: https://www.npmjs.com/package/react-toastify
jQuery: https://code.jquery.com/
Material icons: https://material.io/resources/icons/?style=baseline
react-router-dom: https://www.npmjs.com/package/react-router-dom
Picture Attributions:
Fbla logos: https://www.fbla-pbl.org/cmh/logos-images/
Gradient image http://www.capbl.org/conferences/nlc
Card image qa http://thinkcybis.com/story/the-national-stage/
Card image quiz https://www.cafbla.org/domain/30
