Search code examples
google-app-enginegoogle-app-engine-python

How to configure application name when running dev_appserver.py?


I used to configure the application name in app.yaml. But I just re-read the latest docs, and they say:

The recommended approach is to remove the application element from your app.yaml file and instead, use a command-line flag to specify your application ID:

To use the gcloud app deploy command, you must specify the --project flag:

gcloud app deploy --project [YOUR_PROJECT_ID]

To use the appcfg.py update command, you specify the -A flag:

appcfg.py update -A [YOUR_PROJECT_ID]

But what about dev_appserver.py? How do I configure it with the project name?


Solution

  • dev_appserver.py also supports the -A flag to set the application id.

    From the output for dev_appserver.py -h:

    -A APP_ID, --application APP_ID
    Set the application, overriding the application value
    from the app.yaml file. (default: None)