2. 安裝 uwsgi$sudo apt-get install build-essential python-dev python-pip
3. 建立 uwsgi-hello.py:$sudo pip install uwsgi
4. 執行 uWSGI, 作為 HTTP server/router, 把 request pass 給 WSGI application uwsgi-hello.py:def application(env, start_response): start_response('200 OK', [('Content-Type','text/html')]) return [b"Hello World via uWSGI"]
5. 檢視執行結果:$uwsgi --http :9090 --wsgi-file uwsgi-hello.py
參考文章
Quickstart for Python/WSGI applications