雖然GAE出來很久了,朋友也給我介紹過,但是一直無緣真正接觸一下,今天終於有時間安裝GAE getting started做了一次Hello World,呵呵,步驟很簡單三步。
prerequired : python 2.5 ,GAE-SDK
1:建立helloworld 文件夾,例如d:/python/helloworld
2:建立Python文件hellowrold.py
print 'Content-type:text/plain'
print ''
print 'hello world!'
3:在helloworld 文件夾下建立配置文件app.yaml
application: helloworld
version: 1
runtime: python
api_version: 1
handlers:
- url: /.*
script: helloworld.py
4:執行GAE web server,前提是你有吧GAE的SDK的安裝路徑配置到系統Path中
dev_appserver.py helloworld/ 出現錯誤
google.appengine.tools.dev_appserver.AppConfigNotFoundError
執行命令改爲:dev_appserver.py d:/python/helloworld/即可
5:http://localhost:8080 查看執行效果