feat: perform websocket deployment test
This commit is contained in:
2
.deployment
Normal file
2
.deployment
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[config]
|
||||||
|
SCM_DO_BUILD_DURING_DEPLOYMENT=true
|
||||||
35
.vscode/settings.json
vendored
Normal file
35
.vscode/settings.json
vendored
Normal 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
13
__init__.py
Normal 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()
|
||||||
Reference in New Issue
Block a user