Testing your Google API connectors in development


Written on October 19, 2009 – 1:49 am | by admin

I often find myself needing to interface with google and their suite of applications. It may be obvious but I thought I would share my method of configuring my environment so I can actually connect to the google servers with the same api key that I use on production. First you need to make sure you use a wildcarded domain when setting up your key. Do not put a www before your domain name (http://yourdomain.etl). The next thing you need to do is make changes to your hosts file to point something like development.yourdomain.etl to your local machine. It should look something like this

127.0.0.1 localhost local.yourdomain.com

On a linux or MacOs Machine you will find this fine located under /etc/hosts and on windows its easiest to just search for it but it should be in /windows/system. Now when you go to local.yourdomain.etl in your browser it will point to your local machine and your google api keys will work while in development. If you are working with rails or some other framework that runs your server on a particular port than you can just append the port to the domain just as you would append it to an ip address.

Tags:

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Post a Comment