Search code examples
pythongoogle-app-enginegoogle-cloud-platformmicroservices

Does my default app have to be deployed to appspot.com?


I asked a question about the default app as it related to microservices on app engine and got a great response here, but I have another related question.

Does my default app have to be accessible via appspot.com? When I run the deploy command that's where it puts it, but I'd rather have it not accessible like that. I really just want a semi-empty (like hello world sized) app that satisfies the default app requirement.

It does seem like Google is shoehorning multi-app/microservices into an environment that was originally setup to only serve a single web facing app backed by other modules. It seems very ungraceful and hacky.


Solution

  • You can customize your app to perform differently based on the URL that was used.

    For example, you can use domain specific routes with webapp2 or you can check the domain in your handler by checking the value of self.request.url and responding accordingly.

    You could for example, have myapp.appspot.com return a 404 but have www.mydomain.com provide content to users.