2016-10-18 09:22:49 +01:00
|
|
|
# Run with: gunicorn --workers=1 --worker-class=meinheld.gmeinheld.MeinheldWorker falc:app
|
|
|
|
|
|
|
|
import falcon
|
|
|
|
import ujson as json
|
|
|
|
|
2018-12-30 11:18:06 +00:00
|
|
|
|
2016-10-18 09:22:49 +01:00
|
|
|
class TestResource:
|
|
|
|
def on_get(self, req, resp):
|
|
|
|
resp.body = json.dumps({"test": True})
|
|
|
|
|
2018-12-30 11:18:06 +00:00
|
|
|
|
2016-10-18 09:22:49 +01:00
|
|
|
app = falcon.API()
|
2018-12-30 11:18:06 +00:00
|
|
|
app.add_route("/", TestResource())
|