Add static file serving and basic docker config
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
venv
|
||||
__pycache__
|
||||
static
|
||||
|
||||
@@ -152,9 +152,14 @@ class GlebbyState:
|
||||
state = GlebbyState()
|
||||
state.start_event_thread()
|
||||
|
||||
app = Flask(__name__)
|
||||
# TODO: Examine Quart (basically an asyncio version of flask)
|
||||
app = Flask(__name__, static_url_path='')
|
||||
sock = Sock(app)
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
return app.send_static_file('index.html')
|
||||
|
||||
@sock.route('/glebby')
|
||||
def echo(sock):
|
||||
client_id = state.add_client(sock)
|
||||
|
||||
Reference in New Issue
Block a user