from starlette.applications import Starlette
from starlette.templating import Jinja2Templates
from starlette.routing import Route
from pprint import pprint


templates = Jinja2Templates(directory='templates')


async def home(request):
    pprint(request)
    pprint(dir(request))
    pprint(request.user)
    return templates.TemplateResponse(
        'index.html',
        {
            'request': request,
        },
    )


routes = [Route('/', endpoint=home)]


app = Starlette(debug=True, routes=routes)
