Be the first to know about special offers and new products for web developers and Internet business owners.
I will never share your email address with the bad boys. Period.
|
Be the first to know about special offers and new products for web developers and Internet business owners. I will never share your email address with the bad boys. Period.
The latest
Recent comments
|
How to use a public IP address with Google App Engine development server
Submitted by alexis on Fri, 2008-10-24 17:05.
And just when I thought that setting up Apache, mod_python and Lighty with Django was cool, and I haven't even started playing with mod_wsgi or nginx (the powerful Russian HTTP server, pronounced engine X) came the requirement to move the Django application I'm developing for Facebook to Google App Engine, the latest, and it seems the coolest, player in the cloud computing arena. While my code was running on a pure Django environment I setup the callback url in Facebook's developer application to point to my local server, some simple port forwarding in my router did the trick. Now I wanted to do the same using Google App Engine's development server. After having one of my internal IP addresses accesible from the outside Facebook could call my application running at home. I noticed then that Django's development server made Facebook time out and started using my Apache/Lighty setup for development, you may need to setup your max requests per child setting on Apache to do that. Anyway, I wanted to do the same when I started porting my Django application to Google App Engine (take a look at the App Engine helper for Django) and knew I had to change the way of calling dev_appserver.py, which usually is like this:
I added dev_appserver.py and appcfg.py to my path to avoid writing long command lines. Calling the server without parameters shows a list of options, a for changing the IP address and p for the port, hence this should work:
As you can see my private address is 192.168.0.180. If you run that command like that you may get:
Oops, permissions. Maybe we need sudo:
Yep, that works. Now, if you get this error:
some other process is using the address and port you selected. The easiest way to fix this is stopping the web servers you have installed. If you want to know which process is using the address and port run netstat:
where 192.168.0.180 is the private IP address you want to use for Google App Engine's development server. Gotcha! That's it. You can test by visiting the public IP address assigned to your connection and should see your Google App Engine application running. That's it. Now point the callback url of your Facebook application to your local development server. I guess you could tell Facebook to use any other port and keep 80 for other uses but I haven't tried it. I'm almost done with this application and have learned and tested lots of new stuff. Stay tuned as I'll write more on how to hit the road with Django, Facebook and the Google App Engine. See you then. Trackback URL for this post:http://www.ventanazul.com/webzine/trackback/128
|
Want to launch a online store, need a new look for your website, market your services on the Net or build a virtual community? Not a problem, let's talk about it. Where To Host Your Sites? |
Post new comment