Serve static file using App Engine

后端 未结 5 1389
借酒劲吻你
借酒劲吻你 2020-12-02 18:59

I created an App Engine application. Till now, I only have a few HTML files to serve. What can I do to make App Engine serve the index.html file whenever someone visits http

5条回答
  •  爱一瞬间的悲伤
    2020-12-02 19:47

    If you're trying to map / to index.html:

    handlers:
    - url: /
      upload: folderpath/index.html
      static_files: folderpath/index.html
    

    the url: will match on a path and supports regex.

    - url: /images
      static_dir: static_files/images
    

    So if your image file is stored at static_files/images/picture.jpg use this:

    
    

提交回复
热议问题