虽然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 查看执行效果