Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix auto-complete example #45

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/autocomplete/autocomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async def index(request: Request) -> dict[str, Any]:
async def init(loop: AbstractEventLoop):
port = os.environ.get("PORT", 8080)
host = "localhost"
app = web.Application(loop=loop)
app = web.Application()
print("Starting server at port: %s" % port)

aiohttp_jinja2.setup(app, loader=jinja2.FileSystemLoader("."))
Expand All @@ -102,7 +102,7 @@ async def init(loop: AbstractEventLoop):


def main():
loop: AbstractEventLoop = asyncio.get_event_loop()
loop = asyncio.get_event_loop()
app, host, port = loop.run_until_complete(init(loop))
web.run_app(app, host=host, port=int(port))

Expand Down
Loading