hafas-linked-connections-server

Create a Linked Connections endpoint from a HAFAS client.

Usage no npm install needed!

<script type="module">
  import hafasLinkedConnectionsServer from 'https://cdn.skypack.dev/hafas-linked-connections-server';
</script>

README

hafas-linked-connections-server

Create a Linked Connections endpoint from a HAFAS client. Very hacky & slow.

npm version build status ISC-licensed support me via GitHub Sponsors chat with me on Twitter

Installation

npm install hafas-linked-connections-server

Usage

'use strict'

const createClient = require('vbb-hafas')
const createServer = require('hafas-linked-connections-server.')

const baseUrl = 'https://my-linked-connections-endpoint/'
const bbox = { // Berlin
    north: 52.53,
    west: 13.355,
    south: 52.5,
    east: 13.43
}

const client = createClient('my awesome program')
const server = createServer(baseUrl, client, bbox)
server.listen(3000)

Note: Because linked open data tools tend to re-fetch resources often, I strongly recommend to use hafas-linked-connections-server with cached-hafas-client. example.js shows how to do it.

Contributing

If you have a question or need support using hafas-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, refer to the issues page.