Nefariously Programmed Mecha
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

hafas-rest-api

0.5.2 • Public • Published

hafas-rest-api

Expose a HAFAS client via an HTTP REST API.

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

Installing

npm install hafas-rest-api

Usage

const hafas = require('hafas-client')
const dbProfile = require('hafas-client/p/db')
 
const createApi = require('.')
 
const config = {
    hostname: 'example.org',
    port: 3000,
    name: 'my-hafas-rest-api',
    homepage: 'https://github.com/someone/my-hafas-rest-api'
}
 
const client = hafas(dbProfile)
const api = createApi(client, config)
 
api.listen(config.port, (err) => {
    if (err) console.error(err)
})

Contributing

If you have a question or have difficulties using hafas-rest-api, 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.

install

npm i hafas-rest-api

Downloadsweekly downloads

94

version

0.5.2

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability