sanic/tests/performance/python/falcon.py

13 lines
292 B
Python
Raw Normal View History

2016-10-09 23:41:37 +01:00
# launch with
# gunicorn --workers=1 --worker-class=meinheld.gmeinheld.MeinheldWorker falcon:api
import sys
import falcon
import ujson as json
class Resource:
def on_get(self, req, resp):
resp.body = json.dumps({"test": True})
api = falcon.API()
api.add_route('/', Resource())