Spaces:
Running
Running
Commit
·
12a8852
1
Parent(s):
35f022f
Code Updates & Optimisations
Browse files
FileStream/server/APP/__init__.py
CHANGED
@@ -12,11 +12,14 @@ from FileStream.Exceptions import FIleNotFound, InvalidHash
|
|
12 |
|
13 |
async def handle_v2(request):
|
14 |
return web.Response(text="Hello from app v2!")
|
|
|
|
|
|
|
15 |
|
16 |
static_dir = os.path.join("FileStream", "bot", "server", "template")
|
17 |
sub_app.router.add_static('/static/', path=static_dir, name='static')
|
18 |
|
19 |
-
|
20 |
sub_app.router.add_get('/', handle_v2)
|
21 |
sub_app.router.add_get('/watch/{path}', stream_handler)
|
22 |
sub_app.router.add_get('/up', upload_handler)
|
|
|
12 |
|
13 |
async def handle_v2(request):
|
14 |
return web.Response(text="Hello from app v2!")
|
15 |
+
|
16 |
+
sub_app = web.Application()
|
17 |
+
|
18 |
|
19 |
static_dir = os.path.join("FileStream", "bot", "server", "template")
|
20 |
sub_app.router.add_static('/static/', path=static_dir, name='static')
|
21 |
|
22 |
+
|
23 |
sub_app.router.add_get('/', handle_v2)
|
24 |
sub_app.router.add_get('/watch/{path}', stream_handler)
|
25 |
sub_app.router.add_get('/up', upload_handler)
|