Mixing static and dynamic endpoints in app.yaml file

Posted by Greg on Stack Overflow See other posts from Stack Overflow or by Greg
Published on 2011-01-22T19:53:15Z Indexed on 2011/11/18 1:50 UTC
Read the original article Hit count: 320

Filed under:
|

I'm trying to describe endpoints in my App Engine app and am having difficulty for directory structures that mix static and dynamic content. But my yaml rules are conflicting with one another. Before I change my directory structure, does anyone have a recommendation?

The goal is to create a directory that contains both documentation (static html files) and implementations.

/api
  - /v1
    - getitdone.py
  - doc.html
  - index.html

What I think I should be doing with my application yaml...

- url: /api/v1/getitdone
  script: api/v1/getitdone.py

- url: /api/
  static_files: api/index.html
  upload: api/index.html  

- url: /api
  static_dir: api

But this causes the dynamic endpoints to fail. I'm assuming the static_dir reference is breaking it. How can I do this without describing every script and static file reference (I have many more than are listed here)?

© Stack Overflow or respective owner

Related posts about google-app-engine

Related posts about yaml