feat: perform websocket deployment test

This commit is contained in:
2021-07-01 00:17:00 -04:00
parent de6ab1e094
commit 086e819bfb
3 changed files with 50 additions and 0 deletions

2
.deployment Normal file
View File

@@ -0,0 +1,2 @@
[config]
SCM_DO_BUILD_DURING_DEPLOYMENT=true

35
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,35 @@
{
"appService.zipIgnorePattern": [
"__pycache__{,/**}",
"*.py[cod]",
"*$py.class",
".Python{,/**}",
"build{,/**}",
"develop-eggs{,/**}",
"dist{,/**}",
"downloads{,/**}",
"eggs{,/**}",
".eggs{,/**}",
"lib{,/**}",
"lib64{,/**}",
"parts{,/**}",
"sdist{,/**}",
"var{,/**}",
"wheels{,/**}",
"share/python-wheels{,/**}",
"*.egg-info{,/**}",
".installed.cfg",
"*.egg",
"MANIFEST",
".env{,/**}",
".venv{,/**}",
"env{,/**}",
"venv{,/**}",
"ENV{,/**}",
"env.bak{,/**}",
"venv.bak{,/**}",
".vscode{,/**}"
],
"appService.defaultWebAppToDeploy": "/subscriptions/9d2f9730-65d4-42dc-8afb-182b07ec8d83/resourceGroups/development/providers/Microsoft.Web/sites/tetris-clone",
"appService.deploySubpath": "."
}

13
__init__.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()