Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

koop-gist

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koop-gist

Github gist provider for Koop

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
16
166.67%
Maintainers
3
Weekly downloads
 
Created
Source

koop-gist

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.

Install

Koop providers require that you first install Koop. For information on using Koop, see https://github.com/esri/koop.

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

Usage

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')

koop.register(koopGist)

var app = require('express')()

app.use(koop)

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:

/gist/6178185/preview

Test

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.

KOOP_GIST_TOKEN=XXXXXX npm test

Contributing

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

License

Apache 2.0

Keywords

etl

FAQs

Package last updated on 23 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts