Google app engine 我应该如何编写我的Google App Engine App.yaml文件?
我注册了一个谷歌应用程序引擎应用程序,我有以下一些文件: /index.html /css/index.css /js/index.js /反馈/index.html /反馈/css/index.css /反馈/js/index.js 我应该如何编写app.yaml文件Google app engine 我应该如何编写我的Google App Engine App.yaml文件?,google-app-engine,yaml,Google App Engine,Yaml,我注册了一个谷歌应用程序引擎应用程序,我有以下一些文件: /index.html /css/index.css /js/index.js /反馈/index.html /反馈/css/index.css /反馈/js/index.js 我应该如何编写app.yaml文件 谢谢大家! 将前3个文件放入文件夹名“静态”” application: appname version: 1 runtime: python api_version: 1 handlers: - url: /favic
谢谢大家! 将前3个文件放入文件夹名“静态””
application: appname
version: 1
runtime: python
api_version: 1
handlers:
- url: /favicon.ico
static_files: img/favicon.ico
upload: img/favicon.ico
mime_type: image/x-icon
- url: /css #your css folder
static_dir: css
- url: /scripts #your javascript folder
static_dir: scripts
- url: /img #your image folder
static_dir: img
- url: /.*
script: your_script.py
在你的main.py中
class IndexHandler(webapp.RequestHandler):
def get(self):
self.redirect('static/index.html')
def main():
application = webapp.WSGIApplication([
('/index.html', IndexHandler),
], debug=True)
run_wsgi_app(application)
这样写不好,,
但这会解决您的问题。谢谢您的回复!大熊。
class IndexHandler(webapp.RequestHandler):
def get(self):
self.redirect('static/index.html')
def main():
application = webapp.WSGIApplication([
('/index.html', IndexHandler),
], debug=True)
run_wsgi_app(application)