Serve static file using App Engine

后端 未结 5 1239
借酒劲吻你
借酒劲吻你 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:41

    It could be done using (app.yaml):

    handlers:
    - url: /appurl
      script: myapp.app
    
    - url: /(.+)
      static_files: staticdir/\1
      upload: staticdir/(.*)
    
    - url: /
      static_files: staticdir/index.html
      upload: staticdir/index.html
    

提交回复
热议问题