GoogleAppEngineLauncher で Hello, world! - はじめてのGAE その1
Google App Engine が一般公開され、SDK もバージョンアップした様なので試してみる事にした。
参考
手順
- GoogleAppEngineLauncher.app を起動
- 新規アプリケーションを作成 File > New Application(cmd + N)
- helloworld.py を作成
- app.yaml を編集
- Web サーバを起動 Control > Run(cmd+R)
- Web サーバへアクセス
- Hello, world!
1. GoogleAppEngineLauncher.app を起動
- Download and Install the SDK for App Engine | App Engine Documentation | Google Cloud からダウンロードした GoogleAppEngineLauncher-1.1.0.dmg を開く。
- GoogleAppEngineLauncher.app をアプリケーションフォルダ等にコピー。
- 起動。
2. 新規アプリケーションを作成
3. helloworld.py を作成
print 'Content-Type: text/plain' print '' print 'Hello, world!'http://code.google.com/appengine/docs/gettingstarted/helloworld.html
4. app.yaml を編集
- 8行目の main.py を helloworld.py に。
application: helloworld version: 1 runtime: python api_version: 1 handlers: - url: .* script: helloworld.py
5. Web サーバを起動
- Control > Run(cmd+R)
6. Web サーバへアクセス
- Control > Browse(cmd+B)
7. Hello, world!
- 実際は helloworld.py 中の「'」を一つ入力し忘れてエラーが沢山表示された。不注意注意