Skip to content

Instantly share code, notes, and snippets.

@sgammon
Created May 24, 2013 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgammon/5645642 to your computer and use it in GitHub Desktop.
Save sgammon/5645642 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
"""
Runserver for apptools-based services and handlers.
"""
from gevent import pywsgi
from apptools import dispatch
def run(app=dispatch.gateway, host='127.0.0.1', port=8080):
''' Run a WSGI-compatible server. '''
server = pywsgi.WSGIServer((host, port), app)
server.serve_forever()
if __name__ == '__main__':
run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment