Skip to content

Instantly share code, notes, and snippets.

@kgriffs
Created February 5, 2016 18:28
Show Gist options
  • Save kgriffs/32768653b9173df00047 to your computer and use it in GitHub Desktop.
Save kgriffs/32768653b9173df00047 to your computer and use it in GitHub Desktop.
Sample showing how to self-host a Falcon app
import falcon
app = falcon.API()
if __name__ == '__main__':
from wsgiref.simple_server import make_server
server = make_server('localhost', 8000, app)
print("Listening on localhost:8000")
server.serve_forever()
@kgriffs
Copy link
Author

kgriffs commented Feb 5, 2016

Execute from the command line like so:

python self-host.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment