fix: address websocket not starting on web app

This commit is contained in:
2021-07-01 00:32:03 -04:00
parent 1a7feace0d
commit ab2cd837a3
2 changed files with 5 additions and 1 deletions

13
main.py Normal file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python
import asyncio
import websockets
async def echo(websocket, path):
async for message in websocket:
await websocket.send(message)
asyncio.get_event_loop().run_until_complete(
websockets.serve(echo, 'tetris-clone.azurewebsites.net', 5000))
print("starting websocket...")
asyncio.get_event_loop().run_forever()