google-app-engine


Mixing static and dynamic endpoints in app.yaml file


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)?
The cause of this is that you're marking /api/ as a static directory, so your scripts are getting uploaded as static files, which makes them inaccessible to the App Engine runtime.
The easiest solution would be to put your dynamic code and your static resources in different parts of your app's directory heirarchy, and use app.yaml to map them into the desired URL structure.

Related Links

Best approach for caching lists of objects in memcache
com.google.gcloud.datastore vs com.google.appengine.api.datastore
Google App Engine - Issue with creating a bulkloading config
Solr Timeout error even data is instered
Why does BigQuery fail to parse an Avro file that is accepted by avro-tools?
Insufficient Permission with Appengine Flex service account to access Drive folder
Getting Invalid Key message thrown when creating child records
Where do I find the pricing for the different frontend instance types?
Missing index on specific entities in app engine
Get current deployed timestamp in AppEngine/Go
Jersey throwing exception in Google App Engine
Uploading >10k files as static content to GAE
Dealing with large zip uploads and extracting using google cloud
Android Studio not recognizing gradle 2.10
How to solving ImportError: No module named scraping
Securely providing external service credentials to Google App Engine?

Categories

HOME
deep-learning
merge
jax-rs
datastore
yahoo-finance
fftw
yandex
scripting
limit
babeljs
mapbox
python-multithreading
angularfire2
modal-dialog
extjs4.2
openstreetmap
google-chrome-app
windows-ce
mautic
emoji
ipmitool
php-5.6
magnetic-cards
aws-sdk
foreign-keys
symfony-console
mapstruct
charles
apache2.4
breadth-first-search
inno-download-plugin
php-mysqlidb
flask-sqlalchemy
gmock
xunit
gpio
spotipy
cppreference
complex-numbers
deltaspike
memory-address
reactjs.net
indy10
sim-toolkit
openalpr
google-earth-engine
ideascript
release
android-softkeyboard
microsoft-metro
tcc
placeholder
android-exoplayer
xmldocument
apache-directory
stylecop
facebook-social-plugins
httrack
openresty
ntvs
vugen
semantic-logging
mach-o
webjars
latin
synonym
gogs
query-by-example
dynamics-nav-2016
viola-jones
nutiteq
dot.js
cross-join
psr-4
alternate
paste
decoupling
getopt
rfc5322
scrypt
mvc-editor-templates
merb
joomla-template
cascadingdropdown
garbage
google-maps-mobile
luabind
promotion-code
cgbitmapcontextcreate
mtu
timertask
dot-emacs
pbcopy

Resources

Encrypt Message