Created
October 15, 2017 15:50
-
-
Save avelino/154a2d612b4ff732558e81113762abde to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://avelino.xxx/go-vs-python-more-request-per-second/ | |
import falcon | |
class ThingsResource: | |
def on_get(self, req, resp): | |
resp.status = falcon.HTTP_200 | |
resp.body = ("Hello World") | |
app = falcon.API() | |
things = ThingsResource() | |
app.add_route('/', things) | |
if __name__ == '__main__': | |
from gevent.wsgi import WSGIServer | |
http_server = WSGIServer(('', 8080), app, log=None) | |
http_server.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment