การใช้ Remote Shell API ใน Google App Engine
เราสามารถใช้ Python Interactive Shell ทั้งใน เซอร์เวอร์จำลองและเซอร์เวอร์จริง ๆ ได้ตามขั้นตอนต่อไปนี้
1. เพิ่มบรรทัดต่อไปนี้ในแฟ้ม app.yaml
- url: /remote_api
script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
login: admin
2. เรียกใช้งาน Shell ด้วยคำสั่งต่อไปนี้
2.1 ในเซอร์เวอร์จริง
- python remote_api_shell.py" ksnsurin /remote_api
( AppID = ksnsurin )
2.2 ในเซอร์เวอร์จำลอง
- python remote_api_shell.py -s localhost:8080 test
( โดยที่Promp = test )
บทความสำหรับอ่านเพิ่มเติม
1. Blogging on App Engine, part 1: Static serving ตอนท้ายๆ มีการพูดถึงการเข้าใช้ Shell ในเซอร์เวอร์จำลอง
2. How to delete all datastore in Google App Engine? มีคำตอบหนึ่งที่พูดถึงการใช้งาน Remote Shell (connect remote server in your commandline: remote_shell_api.py yourapp /remote_api ...)
1. เพิ่มบรรทัดต่อไปนี้ในแฟ้ม app.yaml
- url: /remote_api
script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
login: admin
2. เรียกใช้งาน Shell ด้วยคำสั่งต่อไปนี้
2.1 ในเซอร์เวอร์จริง
- python remote_api_shell.py" ksnsurin /remote_api
( AppID = ksnsurin )
2.2 ในเซอร์เวอร์จำลอง
- python remote_api_shell.py -s localhost:8080 test
( โดยที่Promp = test )
บทความสำหรับอ่านเพิ่มเติม
1. Blogging on App Engine, part 1: Static serving ตอนท้ายๆ มีการพูดถึงการเข้าใช้ Shell ในเซอร์เวอร์จำลอง
2. How to delete all datastore in Google App Engine? มีคำตอบหนึ่งที่พูดถึงการใช้งาน Remote Shell (connect remote server in your commandline: remote_shell_api.py yourapp /remote_api ...)
ความคิดเห็น