sanic/tests/performance/python/falcon.py
2016-10-09 15:41:37 -07:00

13 lines
292 B
Python

# 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())