deeper-blue / negativei2-server

The server for Deeper Blue, an assistive chess-playing robot. Developed for the System Design Project, a 3rd year course offered at the School of Informatics, University of Edinburgh.
Other
3 stars 0 forks source link

Add /getgame and /creategame #14

Closed notexactlyawe closed 5 years ago

notexactlyawe commented 5 years ago

Adds in code for the /getgame and /creategame endpoints. In the process of adding these, it also incorporates Firestore access.

Changes

FIREBASE_SERVICE_ACCOUNT_JSON is the JSON containing the private key for Firestore and GOOGLE_APPLICATION_CREDENTIALS is the location of the file that we write out with the contents of FIREBASE_SERVICE_ACCOUNT_JSON. The reason we do this is because to authenticate with Firestore we need this JSON to be saved as a file on the server, but Heroku doesn't have a permanent file system, so we need to store the JSON as an environment variable and then write it to a file every time we start the server.

What needs to happen