archive
/
lantern
Archived
1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
lantern/lantern/route.py

10 lines
337 B
Python

from sanic.response import html
from lantern.handle import execute_handle, get_http_status_code
import os
async def main_route(request, path=None):
handle = os.path.join(os.path.dirname(__file__), 'test_handle.py')
result = execute_handle(handle, {})
return html(result.html, status=get_http_status_code(result.exit_code))