Google App Engine dev_appserver.py


#1

My website has a backend which is handled by Google App Engine. In order to develop the backend, I need to be able to run the Google App Engine development server in my development environment. This server is provided by the dev_appserver.py script included with the App Engine SDK.

The server script requires Python 2.7 and runs fine in the Cloud 9 IDE, but I can’t seem to get any requests to pass to it. I use the following command to launch the script:

dev_appserver.py --host $IP --port 8081 --admin_host $IP --admin_port 8082 ./backend/

The script output indicates that it successfully binds to 0.0.0.0:8081 and 0.0.0.0:8082, but I can’t the pages to load when I send it requests.

There isn’t much information on developing in Google App Engine on Cloud 9, so I’m at a loss as to how to fix this problem. Does anyone have any insight or advice as to how to get the development server to work?

Thanks.


#2

Hey @Pastamancer :smiley:,

You may need to use $PORT for the --port value.

See:

:book: :monkey:


#3

Mike,

Thanks for the response, I have seen that project. The problem is that it is 3 years old, and the dev_appserver.py script is significantly different now. It needs two ports to bind to, as it runs both an administrative backend and the user’s python script. Also, $PORT is always 8080.

According to Cloud 9 docs, 8081 and 8082 are also bindable ports, I’m trying to figure out why traffic does not seem to be coming in on them.


#4

Hi Patrick,

Have you taken a look at our multiple ports doc yet? In sort, multiple ports are supported, but they are accessed with a port specifier.

Regards,
​Mutahhir


#5

Mutahhir,

I can’t seem to access the link in your comment. Can you check that it works?


#6

Huh, weird! :confused:

The link should be: http://docs.c9.io/v1.0/docs/multiple-ports


#7

This works for me - gcloud has been updated a lot since the original post.

dev_appserver.py app.yaml --enable_host_checking=false --admin_port 8081  --enable_console=true