uWSGIのインストールとHello world

提供: Wikiducca
2014年6月26日 (木) 03:15時点におけるYosuke (ノート | 投稿記録)による版

(差分) ←前の版 | 最新版 (差分) | 次の版→ (差分)
移動: 案内検索

uWSGI インストール

# easy_install -Z uwsgi

hello.py 作成

# vi hello.py

中身

def application(env, start_response):
    start_response('200 OK', [('Content-Type','text/html')])
    return "Hello World"

Web サーバ起動

Port 9090 での例。

# uwsgi --http :9090 --wsgi-file hello.py

アクセス

以下のようにアクセスできるようになった。

http://example.com:9090/


以上。