(zip) => (state,city)
Pull request Compare This branch is even with yayuhh:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
public/stylesheets
routes
.gitignore
HISTORY.md
Procfile
README.md
app.js
package.json

README.md

jeocoder

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. 👎

Setup

git clone git@github.com:jmonster/node-jeocoder.git
cd node-jeocoder && npm install
node app

Usage

GET /postal_codes/:code

Parameters

  • code a valid 5-digit US zip code or 6-character Canadian postal code

Examples

GET /postal_codes/15213
{
  "state": "PA",
  "city": "PITTSBURGH",
  "country": "US"
}
GET /postal_codes/H2Y1C6
{
  "province": "QC",
  "city": "MONTRÉAL",
  "country": "CA"
}

Support

Live Demo

http://jeocoder.herokuapp.com/zips/15213