Giter VIP home page Giter VIP logo

hafas-gtfs-rt-server-example's Introduction

hafas-gtfs-rt-server-example

Expose a HAFAS endpoint as a GTFS Realtime (GTFS-RT) server.

ISC-licensed chat with me on Gitter support me via GitHub Sponsors

This is an example project that demonstrates how to

  1. use hafas-client & hafas-monitor-trips to fetch live data about all vehicles in a bounding box,
  2. use hafas-gtfs-rt-feed & gtfs-rt-differential-to-full-dataset to build a live GTFS Realtime (GTFS-RT) feed from the data,
  3. use serve-buffer to serve the feed efficiently.

Installing & running

hafas-gtfs-rt-server-example expects a Redis server running on 127.0.0.1:6379 (default port), but you can set the REDIS_URL environment variable to change this.

Specify the bounding box to be observed as JSON:

BBOX='{"north": 52.52, "west": 13.36, "south": 52.5, "east": 13.39}'

via Docker

A Docker image is available as derhuerst/hafas-gtfs-rt-server-example.

docker run -d -p 3000:3000 -e BBOX='' derhuerst/hafas-gtfs-rt-server-example

Note: The Docker image does not contain the Redis server.

manually

git clone https://github.com/derhuerst/hafas-gtfs-rt-server-example.git
cd hafas-gtfs-rt-server-example
npm install --production

env BBOX='' node index.js

hafas-gtfs-rt-server-example's People

Contributors

derhuerst avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.