Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 1.19 KB

README.md

File metadata and controls

58 lines (36 loc) · 1.19 KB

Self-learning TicTacToe with Axon and Python

(This is a work in progress repo. Do not use it in production.)

Requirements

To install the app, first clone this repository.

git clone https://github.com/holixon/axon-python-tictactoe.git

Next install the dependencies. (Assuming in a sourced venv where axon-python-synapse is installed)

cd axon-python-tictactoe
pip install .

You need a running synapse server. You can start axon and synapse server with the following command.

docker compose -f docker/docker-compose-axon.yaml up -d

To start the backend app.

python -m backend

Likewise for the frontend app.

python -m frontend

Configure the axon synapse server endpoint for frontend and backend apps with the environment variable AXON_SYNAPSE_API.

# default is http://localhost:8080/v1
AXON_SYNAPSE_API=http://axon-synapse:8080/v1 python -m frontend

The backend app registers its callback handlers using the host as defined in CALLBACK_HOST.

# default is system hostname
CALLBACK_HOST=tictactoe AXON_SYNAPSE_API=... python -m backend