uWSGIのインストールとHello world

2019年1月17日 (木) 04:14時点におけるYosuke (トーク | 投稿記録)による版 (1版)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)

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/


以上。