fsb / FileStream /server /APP /__init__.py
privateone's picture
Code Updates & Optimisations :Server Upgrade Test
e7e7a2e
raw
history blame
500 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!")
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)