Files
httpbin/run_httpbin.py
T
2012-02-26 22:38:17 -08:00

17 lines
301 B
Python
Executable File

# -*- coding: utf-8 -*-
import sys
from gevent.wsgi import WSGIServer
from httpbin import app
try:
port = int(sys.argv[1])
except (IndexError, ValueError):
port = 5000
print 'Starting httpbin on port {0}'.format(port)
http_server = WSGIServer(('', port), app)
http_server.serve_forever()