diff options
author | Roberto De Ioris <info@unbit.it> | 2013-08-06 07:38:11 +0200 |
---|---|---|
committer | Roberto De Ioris <info@unbit.it> | 2013-08-06 07:38:11 +0200 |
commit | 76c6ae6d162a2c33d21429f21fce1a3e713551d0 (patch) | |
tree | 1b8b8457a33f175267e480125cd38e06b5ea6062 /examples | |
parent | 40054e3494cea76a0806664613b8e09682b961e4 (diff) | |
download | uwsgi-76c6ae6d162a2c33d21429f21fce1a3e713551d0.tar.gz |
mv again
Diffstat (limited to 'examples')
-rw-r--r-- | examples/multiapp.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/multiapp.py b/examples/multiapp.py new file mode 100644 index 00000000..5b2f1125 --- /dev/null +++ b/examples/multiapp.py @@ -0,0 +1,22 @@ +import werkzeug +import uwsgi + +def zero_app(e,s): + s('200 OK', [ ('Content-Type', 'text/plain') ]) + return "0" + +def not_found(e,s): + s('404 Not Found', [ ('Content-Type', 'text/plain') ]) + return "" + + +def wsgi_app(e, s): + s('200 OK', [ ('Content-Type', 'text/plain') ]) + yield "I am a WSGI app\n" + + +def internal_server_error(e, s): + s('500 Internal Server Error', [ ('Content-Type', 'text/plain') ]) + return "" + +uwsgi.applications = {'/wsgi':wsgi_app, '/test':werkzeug.test_app, '/zero':zero_app, '/notfound':not_found, '/ise':internal_server_error} |