Rest Api service for the hafas-client library (work in progress). Profiles supported: db, bvg, oebb.
The OpenAPI compliant Rest Api is generated by using the Tsoa Framework.
It is possible to generate the controller methods from the TypeScript declaration file.
- npm install
- Tsoa can't get interfaces from node_modules, therefore copy types to src: ./scripts/prepare-hafas-types
- optional: generate controller methods: ./scripts/generate-controller-methods
- create routes: yarn run tsoa routes
- create OpenApi specs: yarn run tsoa spec
- compile to javascript: tsc
- start the server: node build/server.js