Skip to content

Commit

Permalink
minor updates to sanic examples
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Feb 13, 2017
1 parent 251485d commit c39a775
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/sanic/latency.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from sanic import Sanic
from sanic.response import HTTPResponse
from sanic.response import html

import engineio

Expand All @@ -11,7 +11,7 @@
@app.route('/')
async def index(request):
with open('latency.html') as f:
return HTTPResponse(body=f.read(), content_type='text/html')
return html(f.read())


@eio.on('message')
Expand Down
2 changes: 1 addition & 1 deletion examples/sanic/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
aiofiles==0.3.0
httptools==0.0.9
-e [email protected]:miguelgrinberg/python-engineio@b2da2283451d558298cae888b9ef148186830a7e#egg=python_engineio
python_engineio
sanic==0.3.1
six==1.10.0
ujson==1.35
Expand Down
4 changes: 2 additions & 2 deletions examples/sanic/simple.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from sanic import Sanic
from sanic.response import HTTPResponse
from sanic.response import html

import engineio

Expand All @@ -11,7 +11,7 @@
@app.route('/')
async def index(request):
with open('simple.html') as f:
return HTTPResponse(body=f.read(), content_type='text/html')
return html(f.read())


@eio.on('connect')
Expand Down

0 comments on commit c39a775

Please sign in to comment.