bakatrouble 3 years ago
parent d4e589ffda
commit 711c5166ca

@ -18,8 +18,6 @@ app.static('/~static/', '~static/', use_content_range=True, stream_large_files=T
j2env = get_j2env(DEBUG)
@app.route('/')
@app.route('/<path:path>')
async def index(request: Request, path=''):
domain = request.host
query = f'?{request.query_string}' if request.query_string else ''
@ -53,6 +51,10 @@ async def index(request: Request, path=''):
abort(404, 'Path was not found')
app.get('/')(index)
app.get('/<path:path>')(index)
if __name__ == '__main__':
if DEBUG:
app.run(host='localhost', port=8080, debug=True, auto_reload=True)

Loading…
Cancel
Save