Google App EngineでHelloworldまで

Helloworldを表示するだけのサンプルを作るまで

1,helloworldディレクトリ作成、
ここがローカルのwebサーバトップの場所になる

2,helloworld.pyファイル作成
   print 'Content-Type: text/plain'
   print ''
   print 'Hello, world!'

3,app.yamlファイル(設定ファイル)作成
   application: helloworld
   version: 1
   runtime: python
   api_version: 1
   
   handlers:
   - url: /.*
     script: helloworld.py

4,webサーバ起動
   google_appengine/dev_appserver.py helloworld/

Windows環境なら上記はこんな感じでフルパスで↓

   "C:\Program Files\Google\google_appengine\dev_appserver.py" c:\helloworld\

5, http://localhost:8080/で表示確認

   Hello, world!
   と表示されれば正常
6,Ctrl + C or Ctrl + Break で終了

※何度もテストする再は実行しっぱなしで良い
ファイルを書き換えてリロードでテストを繰り返す。

最終更新:2010年12月10日 23:28