tip: this frontend is designed to work with Flask-based Backend so it will not load successfully if the backend is not working or not connected. I recommend that you start up the backend first, test using Postman or curl, update the endpoints in the frontend, and then the frontend should integrate smoothly.
-
Installing Node and NPM This project depends on Nodejs and Node Package Manager (NPM). Before continuing, you must download and install Node (the download includes NPM) from https://nodejs.com/en/download.
-
Installing project dependencies This project uses NPM to manage software dependencies. NPM Relies on the package.json file located in the
frontend
directory of this repository. After cloning, open your terminal and run:
npm install
tip:
npm i
is shorthand for `npm install``
The frontend app was built using create-react-app. In order to run the app in development mode use npm start
. You can change the script in the package.json
file.
Open http://localhost:3000 to view it in the browser. The page will reload if you make edits.
npm start
The frontend should be fairly straightforward and disgestible. While viewing the backend request handling and response formatting, you can reference the frontend to view how it parses the responses.
Currently, when a user plays the game they play up to five questions of the chosen category. If there are fewer than five questions in a category, the game will end when there are no more questions in that category.
Please check here for the API documentation
- React