This directory contains a project that implements a realtime two-player game of Tic Tac Toe on Google App Engine Standard, using the Firebase database for realtime notifications when the board changes.
- Install Apache Maven 3.0.5 or later
- Create a project in the Firebase Console
- In the Overview section of the Firebase console, click 'Add
Firebase to your web app' and replace the contents of the file
src/main/webapp/WEB-INF/view/firebase_config.jspfwith that code snippet. - Enable the Identity API
- If you haven't already, Download and initialize the Cloud SDK
gcloud init
- If you haven't already, Create an App Engine app within the current Google Cloud Project
gcloud app create
- If you haven't already, setup
Application Default Credentials
to run your application locally:
Download service account credentials and set the
GOOGLE_APPLICATION_CREDENTIALSenvironment variable to its path:
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/credentials.json
$ mvn appengine:run
When running locally, the page does not automatically refresh, please reload the page manually after each move.
$ mvn appengine:deploy
See CONTRIBUTING.md.
See LICENSE.