Skip to content

derhuerst/gtfs-linked-connections-server

Repository files navigation

gtfs-linked-connections-server

A Linked Connections server using PostgreSQL to serve GTFS.

npm version ISC-licensed minimum Node.js version support me via GitHub Sponsors chat with me on Twitter

Note: This projects follows the Linked Connections 2.0 draft as of 2020-03-18.

Installation

npm install derhuerst/gtfs-linked-connections-server # install from GitHub

Usage

Follow gtfs-via-postgres' instructions on importing data. Make sure to use the --stops-location-index flag.

psql -c 'create database gtfs'
export PGDATABASE=gtfs

# import GTFS into PostgreSQL
npm install -D gtfs-via-postgres
npm exec -- gtfs-to-sql --require-dependencies -- gtfs/*.txt | psql -b

Then serve the imported data as Linked Connections via HTTP:

# start HTTP server that serves Linked Connections
npm install gtfs-linked-connections-server
npm exec -- serve-gtfs-as-lc

Contributing

If you have a question or need support using gtfs-linked-connections-server, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, use the issues page.