node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey »



Github gist provider for Koop

npm travis

Take GeoJSON from a Github gist and serve it as an ArcGIS Feature Service, CSV, KML, or Shapefile.


Koop providers require that you first install Koop. For information on using Koop, see

You can add koop-gist to your Koop server's dependencies by installing it with npm and adding it to your package.json like so:

npm install koop-gist --save


Make sure your koop configuration includes a github access token (ghtoken in the config object passed to koop or KOOP_GIST_TOKEN as an environmental variable). Your Github API requests will be rate limited and you will not have access private gists if you don't include a token.

var koop = require('koop')({
  'ghtoken': 'XXXXXX' // defaults to `process.env.KOOP_GIST_TOKEN` 
var koopGist = require('koop-gist')
var app = require('express')()
app.listen(process.env.PORT || 1337, function () {
  console.log('Listening at http://%s:%d/', this.address().address, this.address().port)

There is an example server in the example directory.

Once koop-gist is registered as provider and you've restarted your Koop server, you can preview GeoJSON files in gists using this pattern:

/gist/{gist id}/preview

so for example:



koop-gist uses tape for testing. It is recommended to create your own Github access token for use during testing to ensure you will not hit Github API rate limits.



Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.


Apache 2.0