Skip to content

Commit

Permalink
Fixed asyncio example code
Browse files Browse the repository at this point in the history
Fixes #35
  • Loading branch information
miguelgrinberg committed Feb 9, 2017
1 parent 2af9292 commit f86847b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ And below is a similar example, coded for asyncio (Python 3.5+ only) with the
from aiohttp import web
import engineio
eio = engineio.Server()
eio = engineio.AsyncServer()
app = web.Application()
eio.attach(app)
async def index():
async def index(request):
"""Serve the client-side application."""
with open('index.html') as f:
return web.Response(text=f.read(), content_type='text/html')
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ aiohttp framework::
from aiohttp import web
import engineio

eio = engineio.Server()
eio = engineio.AsyncServer()
app = web.Application()

# attach the Engine.IO server to the application
eio.attach(app)

async def index():
async def index(request):
"""Serve the client-side application."""
with open('index.html') as f:
return web.Response(text=f.read(), content_type='text/html')
Expand Down

0 comments on commit f86847b

Please sign in to comment.