Skip to content

derhuerst/hafas-monitor-trips-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hafas-monitor-trips-server

A server that manages HAFAS monitors.

npm version build status ISC-licensed chat with me on Gitter support me on Patreon

Installation

npm install hafas-monitor-trips-server

Usage

const createServer = require('hafas-monitor-trips-server')

const server = createServer(hafas)
const subA = server.subscribe({
	north: 52.51, south: 52.4, west: 13.35, east: 13.38
})
const subB = server.subscribe({
	north: 52.505, south: 52.45, west: 13.355, east: 13.375
})

subA.on('stopover', stopover => console.log('A', stopover))
subB.on('stopover', stopover => console.log('B', stopover))

See example.js for a full example.

Contributing

If you have a question or need support using hafas-monitor-trips-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.