API used on the I/O Crossword game for Google I/O. Built with dart_frog.
To run the API you can use the helper start_local_api.sh
script.
Alternatively, you can manually pass the following arguments:
FB_APP_ID=APP_ID \
INITIALS_BLACKLIST_ID=DOCUMENT_ID \
FB_STORAGE_BUCKET=FIREBASE_BUCKET_NAME \
GAME_URL=http://localhost:24514 \
HINT_FUNCTION_URL=FIREBASE_FUNCTION_URL \
dart_frog dev
By default Firebase cloud storage does not allow for accessing images from a cross domain.
To configure it to be able to receive request, do the following:
- Install and have gsutil installed.
- Run, inside this folder:
gsutil cors set cors.json gs://bucket-url.appspot.com