privateone's picture
Code Updates & SeveralFixes
04a7d0b
raw
history blame
634 Bytes
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)