コンテンツにスキップ

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

提供: Wikiducca
ページの作成:「== uWSGI インストール == # easy_install -Z uwsgi == hello.py 作成 == # vi hello.py === 中身 === def application(env, start_response): start_response...」
 
大松「ブロックされないから荒らしやすいンゴねえ」
1行目: 1行目:
== uWSGI インストール ==
<nowiki>Wikiduccaは終了しました。今後はゴールドペディアをご利用ください。== uWSGI インストール ==
  # easy_install -Z uwsgi
  # easy_install -Z uwsgi



2019年1月1日 (火) 13:07時点における版

<nowiki>Wikiduccaは終了しました。今後はゴールドペディアをご利用ください。== 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/


以上。