dataflow.api.serve_chess_client¶

Simple HTTP server to serve the chess client HTML/JS interface.

This script starts a simple HTTP server to serve the chess client interface that connects to the WebSocket API.

Usage:

python serve_chess_client.py [–port PORT]

Note

This is for development/testing only and should not be used in production.

Classes¶

ChessClientHandler

Custom handler to serve files from the static directory.

Functions¶

get_static_dir()

Get the directory containing the static files.

main()

Parse arguments and run the server.

run_server([port])

Run the HTTP server.

Module Contents¶

class dataflow.api.serve_chess_client.ChessClientHandler(*args, **kwargs)¶

Bases: http.server.SimpleHTTPRequestHandler

Custom handler to serve files from the static directory.

Init .

log_message(format, *args)¶

Override to use our logger.

dataflow.api.serve_chess_client.get_static_dir()¶

Get the directory containing the static files.

dataflow.api.serve_chess_client.main()¶

Parse arguments and run the server.

dataflow.api.serve_chess_client.run_server(port=8080)¶

Run the HTTP server.