Serve static file using App Engine

后端 未结 5 1243
借酒劲吻你
借酒劲吻你 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 20:00

    Here is app.yaml for how I got a site generated by Jekyll to work:

    runtime: python27
    api_version: 1
    threadsafe: true
    
    
    handlers:
    - url: /
      static_files: _site/index.html
      upload: _site/index.html
    
    - url: /assets
      static_dir: _site/assets
    
    
    
      # index files
    - url: /(.+)/
      static_files: _site/\1/index.html
      upload: _site/(.+)/index.html
    
    - url: /(.*)
      static_files: _site/\1
      upload: _site/(.*)
    
    - url: /.*
      static_dir: _site
    

提交回复
热议问题