mirror of
https://github.com/kennethreitz/httpbin.git
synced 2026-06-05 14:50:17 +00:00
gevent runner
This commit is contained in:
@@ -1 +1 @@
|
||||
web: gunicorn httpbin:app -b "0.0.0.0:$PORT" -w 3
|
||||
web: python run_httpbin.py $PORT
|
||||
+1
-1
@@ -7,4 +7,4 @@ distribute==0.6.15
|
||||
wsgiref==0.1.2
|
||||
decorator==3.3.1
|
||||
omnijson==0.1.2
|
||||
gunicorn
|
||||
gevent
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
|
||||
from gevent.wsgi import WSGIServer
|
||||
from httpbin import app
|
||||
|
||||
|
||||
try:
|
||||
port = int(sys.argv[1])
|
||||
except (KeyError, ValueError):
|
||||
port = 5000
|
||||
|
||||
print 'Starting httpbin on port {0}'.format(port)
|
||||
http_server = WSGIServer(('', port), app)
|
||||
http_server.serve_forever()
|
||||
Reference in New Issue
Block a user