import os from aiohttp import web from aiohttp.http_exceptions import BadStatusLine #-----------------------------Local Imports-----------------------------# from .render_template import render_page, render_upload from .routes_app import stream_handler,upload_handler #from FileStream.Exceptions import FileNotFound, InvalidHash #------------------------------Functions--------------------------------# async def handle_v2(request): return web.Response(text="Hello from app v2!") #----------------------------Server Routes-----------------------------# app = web.Application() #static_dir = os.path.join("FileStream", "bot", "server", "template") #sub_app.router.add_static('/static/', path=static_dir, name='static') app.router.add_get('/', handle_v2) app.router.add_get('/watch/{path}', stream_handler) app.router.add_get('/up', upload_handler)