Skip to content

Commit

Permalink
initial db-vendo with /journeys (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
traines-source committed Dec 7, 2024
1 parent e9211e8 commit 2e094c2
Show file tree
Hide file tree
Showing 357 changed files with 6,856 additions and 95,431 deletions.
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

26 changes: 26 additions & 0 deletions api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {createClient} from './index.js'
import {profile as dbProfile} from './p/db/index.js'
import {createHafasRestApi as createApi} from 'hafas-rest-api'

const config = {
hostname: process.env.HOSTNAME || 'localhost',
port: process.env.PORT ? parseInt(process.env.PORT) : 3000,
name: "db-vendo-client",
description: "db-vendo-client",
homepage: "https://github.com/public-transport/db-vendo-client",
version: "7",
docsLink: 'https://github.com/public-transport/db-vendo-client',
openapiSpec: true,
logging: true,
aboutPage: true,
etags: 'strong',
csp: `default-src 'none' style-src 'self' 'unsafe-inline' img-src https:`,
}


const vendo = createClient(dbProfile, 'my-hafas-rest-api')
const api = await createApi(vendo, config)

api.listen(3000, (err) => {
if (err) console.error(err)
})
17 changes: 0 additions & 17 deletions docs/api.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/arrivals.md

This file was deleted.

Loading

0 comments on commit 2e094c2

Please sign in to comment.