https://github.com/koopjs/koop-provider-trimet
A TriMet Bus Provider for Koop
https://github.com/koopjs/koop-provider-trimet
koop-provider
Last synced: about 1 month ago
JSON representation
A TriMet Bus Provider for Koop
- Host: GitHub
- URL: https://github.com/koopjs/koop-provider-trimet
- Owner: koopjs
- License: other
- Created: 2017-01-13T01:06:48.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T21:12:20.000Z (over 2 years ago)
- Last Synced: 2025-02-26T13:24:25.053Z (about 2 months ago)
- Topics: koop-provider
- Language: JavaScript
- Homepage: http://dcdev.maps.arcgis.com/home/item.html?id=2603e7e3f10742f78093edf8ea2adfd8#visualize
- Size: 65.4 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Koop-TriMet
## A provider for the TriMet Bus APIThis is a plugin to [Koop](http://koopjs.github.io) that requests data from the [TriMet bus API](https://developer.trimet.org) and returns data in an Esri-compatible [Geoservices](http://geoservices.github.io/) reponse.
[View a live example](http://dcdev.maps.arcgis.com/home/item.html?id=2603e7e3f10742f78093edf8ea2adfd8#visualize)
## Usage
### As a Feature Service
All requests are routed through `http://$koopserver/trimet/FeatureServer/0`### Koop Plugin
It must be used as a Koop plugin. Here's an example server configuration.```javascript
'use strict'
// initialize Koop with configs from env
var Koop = require('koop')
var config = require('config')
var koop = Koop(config)// register providers
var trimet = require('koop-trimet')
koop.register(trimet)// set up the actual app server
var express = require('express')
var app = express()
app.use(koop)
app.get('/status', (req, res) => res.status(200).json({status: 'up'}))
app.listen(80, function () { console.log('we\'re up and running') })
```