From 24d9d950b25810be40c66313a5aae94e014ba419 Mon Sep 17 00:00:00 2001 From: Ciro Date: Thu, 10 Nov 2022 08:40:03 -0300 Subject: [PATCH] added falcon --- bench/falcon_plaintext.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 bench/falcon_plaintext.py diff --git a/bench/falcon_plaintext.py b/bench/falcon_plaintext.py new file mode 100644 index 0000000..690a851 --- /dev/null +++ b/bench/falcon_plaintext.py @@ -0,0 +1,24 @@ +from wsgiref.simple_server import make_server + +import falcon + +class Home: + def on_get(self, req, resp): + resp.status = falcon.HTTP_200 # This is the default status + resp.content_type = falcon.MEDIA_TEXT # Default is JSON, so override + resp.text = "Hello, World!" + + +app = falcon.App() + +home = Home() +app.add_route('/', home) + +if __name__ == '__main__': + with make_server('', 8000, app) as httpd: + print('Serving on port 8000...') + + # Serve until process is killed + httpd.serve_forever() + +#pypy3 -m gunicorn falcon_plaintext:app -w 1 \ No newline at end of file