Jun 19, 2013

Go can't looks static files on GAE

 My work was disrupted by the problem that can't read files in static_dir from Go scripts.

 Be careful to below points.
  • Set "static" to files that are readed by web browsers from a user.
  • Must not set "static" to files that are read by go scripts.
 Files in static_dir can not  read  by go scripts. these read by web browsers.

by Google App Engine documents
For efficiency, App Engine stores and serves static files separately from application files. Static files are not available in the application's file system. If you have data files that need to be read by the application code, the data files must be application files, and must not be matched by a static file pattern.

 Therefore, must not put html files to static_dir if you will output a html file dynamically by use of template package.

No comments:

Post a Comment