2.0.0 • Published 9 years ago

koop-github v2.0.0

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
9 years ago

koop-github

Github provider for Koop

npm travis

Take GeoJSON from a Github repository 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/koopjs/koop.

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

npm install koop-github --save

Usage

Make sure your koop configuration includes a github access token (ghtoken in the config object passed to koop or KOOP_GITHUB_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_GITHUB_TOKEN`
})
var koopGithub = require('koop-github')

koop.register(koopGithub)

var express = require('express')
var app = 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-github is registered as provider and you've started your Koop server, you can preview GeoJSON files in Github repositories using this pattern:

/github/{organization name}/{repository name}/{folder::path::to::geojson}/preview

so for example:

/github/CityOfPhiladelphia/phl-open-geodata/school_facilities::philadelphiaschool_facilities201302/preview

Test

koop-github 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_GITHUB_TOKEN=XXXXXX npm test

Contributing

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

License

Apache 2.0

2.0.0

9 years ago

2.0.0-alpha

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.1.12

9 years ago

0.1.11

9 years ago

0.1.10

9 years ago

0.1.9

9 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.0.1

10 years ago