helloworld
2. in the directory, create two files
(1)helloworld.py:
print 'Content-Type: text/plain'
(4) connect to server
127.0.0.1:8080
(5) update to google web server:
appcfg.py helloworld
print ''
print 'Hello, world!'
(2)app.yaml
application: helloworld
version: 1
runtime: python
api_version: 1
handlers:
- url: /.*
script: helloworld.py
url: /.*
script: helloworld.py means any url will be handled by helloworld.py
(3)run web server:
dev_appserver.py helloworld
(4) connect to server
127.0.0.1:8080
(5) update to google web server:
appcfg.py helloworld
沒有留言:
張貼留言