jeocoder is a geocoder, mapping a 5-digit US zip code or 6-character Canadian postal code to a (city,state/province) tuple. it is self-contained and does not depend on any external services. the geocoder module name was already taken :|
Why not just use Google? It's against their TOS. 👎
git clone [email protected]:jmonster/node-jeocoder.git
cd node-jeocoder && npm install
node app
GET /postal_codes/:code
Parameters
code
a valid 5-digit US zip code or 6-character Canadian postal code
GET /postal_codes/15213
{
"state": "PA",
"city": "PITTSBURGH",
"country": "US"
}
GET /postal_codes/H2Y1C6
{
"province": "QC",
"city": "MONTRÉAL",
"country": "CA"
}