Reputation: 167
I'm migrating a GAE application to modules, and have issues with the routing for my api
module, based on Google Endpoints.
Basically, all my API queries are routed to the default module, while other routing works well
My folder structure is
- /gae
-- dispatch.yaml
-- www/
---- www.yaml
---- [www module files]
-- foo/
---- foo.yaml
---- [foo module files]
-- api/api.yaml
---- api.yaml
---- [foo module files]
dispatch.yaml
application: testapp
dispatch:
- url: "testapp.appspot.com/"
module: default
- url: "*/_ah/spi/*"
module: api
- url: "*/_ah/api/*"
module: api
- url: "*/foo/*"
module: foomodule
I'm deploying with
cd gae
appcfg.py update www/www.yaml upload/upload.yaml api/api.yaml
appcfg.py update_dispatch .
I can see 3 instances (one per module) being deployed.
But then:
/foo/xxx ones
are handled by the foomodule/_ah/spi/xxx
) are going to the default module with a 404./_ah/spi/BackendService.logMessages
in the logs of the api
instance.From the logs I also see that:
alpha-dot-api-dot-testapp.appspot.com
api
module are from testapp.appspot.com
Is there anything that I'm doing wrong? Any special routing needed for Google Endpoints when they're used as modules?
Upvotes: 1
Views: 574
Reputation: 1356
As i see the API is the default module, in the docs say "the default module must be uploaded first" also you need put the parameter "module: default" in the yaml file or not included at all Try
appcfg.py update api/api.yaml www/www.yaml upload/upload.yaml #api first
appcfg.py update_dispatch
Upvotes: 1