File size: 854 Bytes
35f022f
12e4bed
 
 
6ccc851
12e4bed
 
7a5f787
e7e7a2e
6ccc851
12e4bed
 
38342f7
12e4bed
6ccc851
 
38342f7
 
6ccc851
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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)