Spaces:
Running
Running
File size: 650 Bytes
35f022f 12e4bed e7e7a2e 12e4bed e7e7a2e 12e4bed 35f022f 04a7d0b 12e4bed |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import os
from aiohttp import web
from aiohttp.http_exceptions import BadStatusLine
from .render_template import render_page, render_upload
from .routes_app import stream_handler,upload_handler
from FileStream.Exceptions import FIleNotFound, InvalidHash
async def handle_v2(request):
return web.Response(text="Hello from app v2!")
static_dir = os.path.join("FileStream", "bot", "server", "template")
sub_app.router.add_static('/static/', path=static_dir, name='static')
sub_app = web.Application()
sub_app.router.add_get('/', handle_v2)
sub_app.router.add_get('/watch/{path}', stream_handler)
sub_app.router.add_get('/up', upload_handler) |