sanic/tests/performance/tornado/simple_server.py
2016-10-18 09:41:45 -06:00

20 lines
364 B
Python

# Run with: python simple_server.py
import ujson
from tornado import ioloop, web
class MainHandler(web.RequestHandler):
def get(self):
self.write(ujson.dumps({'test': True}))
app = web.Application([
(r'/', MainHandler)
], debug=False,
compress_response=False,
static_hash_cache=True
)
app.listen(8000)
ioloop.IOLoop.current().start()