app.yaml tips with Google App Engine

Configuring app.yaml

The configurations for a Google App Engine application are stored in an app.yaml file. This file will help specify how URL paths correspond with request handlers and static file. (Read more). I'd suggest reading through the documentation provided above to learn about the app.yaml file options. Below I've organized some tips and tricks for a quick reference.

Expiration

handlers within the app.yaml file can be given an expiration time that this handler is to be cached by browsers. (Read More)

handlers:
- url: /images
  static_dir: static/images
  expiration: "14d"

Regular Expressions

In case your site or framework has a specific path structure you can use regular expressions in your configurations.

handlers:
- url: /themes/(.+)/assets/(.+)
  static_files: themes/\1/assets/\2
  upload: themes/(.+)/assets/(.+)