pull/39/head
Ciro 2022-11-10 08:40:03 -03:00
rodzic 9f66752b18
commit 24d9d950b2
1 zmienionych plików z 24 dodań i 0 usunięć

Wyświetl plik

@ -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