express-geocoding-api

0.2.2 • Public • Published

express-geocoding-api Build Status

This module sets up express middleware to expose geocoding endpoints for your app using node-geocoder.

Getting Started

Install the module with: npm install express-geocoding-api

var express_geocoding_api = require('express-geocoding-api'),
    app = require('express')();
 
// See `[node-geocoder](https://github.com/nchaulet/node-geocoder)` documentation for all configuration options
app.use(express_geocoding_api({ 
  geocoder: {
    provider: 'google'
  }
});

This exposes a couple routes to your app.

  • GET /geocode/location?address=<string>
  • GET /geocode/point?latitude=<float>&longitude=<float>

By default, each of these routes returns a JSON object containing locations.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

License

Copyright (c) 2014 Garrett Murphey
Licensed under the MIT license.

Package Sidebar

Install

npm i express-geocoding-api

Weekly Downloads

1

Version

0.2.2

License

none

Last publish

Collaborators

  • gmurphey