「uWSGIのインストールとHello world」の版間の差分

提供: Wikiducca
移動: 案内検索
(ページの作成:「== uWSGI インストール == # easy_install -Z uwsgi == hello.py 作成 == # vi hello.py === 中身 === def application(env, start_response): start_response...」)
(相違点なし)

2014年6月26日 (木) 03:15時点における版

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/


以上。