Is it possible to host a static html site in a Google application?

How to set index.html for default webpage root?

application: dfischerdna version: 1
 runtime: python api_version: 1

 handlers:

 - url: /   
   static_dir: static_files

This works great when types of visitors are http://dfischerdna.appspot.com/index.html

However, I would like the index.html web page to be displayed when it is created. http://dfischerdna.appspot.com/ → goes to page 404

+3
source share
1 answer

This may do the trick for you:

handlers:
- url: /
  static_files: path/to/index.html
  upload: local/path/to/index.html
- url: /(.+)
  static_files: path/to/\1
  upload: local/path/to/(.+)

URL- URL- path/to/index.html. , , , path/to, URI . URL http://yourapp.appspot.com/index.html path/to/index.html, URL-, http://yourapp.appspot.com/foo/bar.html, path/to/foo/bar.html.

GAE, .

+5

Source: https://habr.com/ru/post/1730613/


All Articles