diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/gunicorn/__init__.py | 0 | ||||
-rw-r--r-- | wqflask/gunicorn/genenetwork2.py | 10 | ||||
-rw-r--r-- | wqflask/gunicorn/wsgi.py | 5 | ||||
-rw-r--r-- | wqflask/run_gunicorn.py | 19 | ||||
-rw-r--r-- | wqflask/runserver.py | 2 | ||||
-rw-r--r-- | wqflask/wsgi.py | 4 |
6 files changed, 24 insertions, 16 deletions
diff --git a/wqflask/gunicorn/__init__.py b/wqflask/gunicorn/__init__.py deleted file mode 100644 index e69de29b..00000000 --- a/wqflask/gunicorn/__init__.py +++ /dev/null diff --git a/wqflask/gunicorn/genenetwork2.py b/wqflask/gunicorn/genenetwork2.py deleted file mode 100644 index afbdc934..00000000 --- a/wqflask/gunicorn/genenetwork2.py +++ /dev/null @@ -1,10 +0,0 @@ -from flask import Flask -application = Flask(__name__) - -@application.route("/") -def hello(): - return "<h1 style='color:blue'>Hello There!</h1>" - -if __name__ == "__main__": - application.run(host='0.0.0.0') - diff --git a/wqflask/gunicorn/wsgi.py b/wqflask/gunicorn/wsgi.py deleted file mode 100644 index 8c14ee6b..00000000 --- a/wqflask/gunicorn/wsgi.py +++ /dev/null @@ -1,5 +0,0 @@ -from genenetwork2 import application - -if __name__ == "__main__": - application.run() - diff --git a/wqflask/run_gunicorn.py b/wqflask/run_gunicorn.py new file mode 100644 index 00000000..14a2d689 --- /dev/null +++ b/wqflask/run_gunicorn.py @@ -0,0 +1,19 @@ +# Run with gunicorn, see ./bin/genenetwork2 for an example +# +# Run standalone with +# +# ./bin/genenetwork2 ./etc/default_settings.py -c run_gunicorn.py + +# from flask import Flask +# application = Flask(__name__) + +print "Starting up Gunicorn process" + +from wqflask import app + +@app.route("/gunicorn") +def hello(): + return "<h1 style='color:blue'>Hello There!</h1>" + +if __name__ == "__main__": + app.run(host='0.0.0.0') diff --git a/wqflask/runserver.py b/wqflask/runserver.py index e62e34f2..a0c76e51 100644 --- a/wqflask/runserver.py +++ b/wqflask/runserver.py @@ -1,6 +1,6 @@ # Starts the webserver with the ./bin/genenetwork2 command # -# This uses Werkzeug WSGI, see gunicorn.py for the alternative +# This uses Werkzeug WSGI, see ./run_gunicorn.py for the alternative # # Please note, running with host set externally below combined with # debug mode is a security risk unless you have a firewall setup, e.g. diff --git a/wqflask/wsgi.py b/wqflask/wsgi.py new file mode 100644 index 00000000..be9c7b37 --- /dev/null +++ b/wqflask/wsgi.py @@ -0,0 +1,4 @@ +from run_gunicorn import app as application # expect application as a name + +if __name__ == "__main__": + application.run() |