Type these into your command prompt to install (If you get permission errors, use sudo pip install instead of pip install)
npm install
pip install -r requirements.txt
npm i react-google-login
npm install dotenv
- Run
echo "DANGEROUSLY_DISABLE_HOST_CHECK=true" > .env.development.local
in the project directory
You will need to load your clientID key from a .env file, which is why you will need to install dotenv.
In order to do this, create a .env file and type your key in like so (Your clientID does NOT need to be surrounded by quotation marks):
REACT_APP_GOOGLE_ID=YOUR_CLIENT_ID GOES HERE
VERY IMPORTANT TO NOTE: The .env file MUST be in the root directory of the project. In this case, it needs to be in the react-starter-code directory, NOT outside of it. Unfortunatly, it must be in the directory, so make sure NOT to submit your .env file. It is added to the .gitignore file, so that it cannot be submitted to the github.
-
Cookies CANNOT be disabled or blocked in any way, or app will not be able to function. Make sure that you don't have any third-party extensions blocking cookies.
-
If the host (the person that selects game settings) logs in and immediately leaves, any additional players in the room will not be able to continue with game. As a solve, all remaining players can refresh/log out and start game again.
Below are the warnings/errors that were disabled and why they were disabled:
It marked database commands as errors, even though the commands work fine, and it seems to be picking up a false positive.
It is saying import models are in the wrong position, but it needs to be where it is to avoid circular import issues.
It picks up a false positive at the bottom of the app.py for port, even though the code works fine without issue.
The return statements work fine, and they are not meant to be consistent in the function mentioned. The function it is throwing an error towards is get_new_game
Ignored after linting all other .py files, and it was ignored because it stated that models.py does not have enough public methods. It is not meant to hold many methods, so this error was ignored. All other files did not receive this error except models.py.
Console statements were used to verify and debug code. There were not logging any sensitive information, so they were ignored.
Filename extension is allowed to be ".js." Also, it carried over from the previous project.
Ignored as a carryover from the previous project.
Ignored as a carryover from the previous project.
This error was caused only by the Socket.js
file. This file was used to prevent dependency cycles.
It caused a false error claiming that a <form>
tag was needed due to a labeling error.
There were no errors with dependencies among components. Dependency cycles were fixed for the components that had the potential to cause errors. Others were not edited.
Ternary operators contributed to code readability and caused no errors.
Alerts are being used to notify the user if their profile image is too large.