google-app-enginegoogle-app-engine-gogoogle-app-engine-golang

How to run App Engine Standard apps locally (for development/testing) in 2021 without `dev_appserver.py`?


There have been a lot of changes to App Engine Standard. Is it still possible to have a local instance of the app runnable with something similar to dev_appserver.py and to use the new cloud.google.com/... APIs?

Previously, you could emulate the Datastore locally for example.


Solution

  • For GAE first gen apps, I believe the best option is to stick with dev_appserver.py. I'm keeping my fingers crossed that Google doesn't break that anytime soon.

    For GAE second gen apps, you need to run your app directly (e.g. for Flask, python main.py) and run the datastore emulator in a separate terminal window. Other Google APIs need to be mocked or you can create a test GAE project and use the test project credentials when running locally. For the test project, you may have to pay a bit, but costs should be low.