minor tweaks 📝; 5.0.2

This commit is contained in:
Jannis R 2022-11-22 16:07:33 +01:00
parent f982e152c5
commit 5fc72f098e
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
5 changed files with 6 additions and 4 deletions

View file

@ -18,7 +18,7 @@ This API returns realtime data whenever its upstream, the [API for DB's mobile a
### No API Key ### No API Key
You can just use the API without authentication. There's a [rate limit](https://apisyouwonthate.com/blog/what-is-api-rate-limiting-all-about) of 100 requests/minute (burst 200 requests/minute) set up. You can just use the API without authentication. There's a [rate limit](https://apisyouwonthate.com/blog/what-is-api-rate-limiting-all-about) of 100 requests/minute (burst 150 requests/minute) set up.
### CORS ### CORS

View file

@ -8,6 +8,6 @@ api.listen(config.port, (err) => {
logger.error(err) logger.error(err)
process.exit(1) process.exit(1)
} else { } else {
logger.info(`Listening on ${config.hostname}:${config.port}.`) logger.info(`listening on ${config.port} (${config.hostname}).`)
} }
}) })

View file

@ -1,4 +1,4 @@
Copyright (c) 2021, Jannis R Copyright (c) 2022, Jannis R
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

View file

@ -2,7 +2,7 @@
"private": true, "private": true,
"name": "db-rest", "name": "db-rest",
"description": "A clean REST API wrapping around the Deutsche Bahn API.", "description": "A clean REST API wrapping around the Deutsche Bahn API.",
"version": "5.0.1", "version": "5.0.2",
"main": "index.js", "main": "index.js",
"author": "Jannis R <mail@jannisr.de>", "author": "Jannis R <mail@jannisr.de>",
"homepage": "https://github.com/derhuerst/db-rest/tree/5", "homepage": "https://github.com/derhuerst/db-rest/tree/5",

View file

@ -10,6 +10,8 @@ let pAllStations = require('../lib/db-stations')
const JSON_MIME = 'application/json' const JSON_MIME = 'application/json'
const NDJSON_MIME = 'application/x-ndjson' const NDJSON_MIME = 'application/x-ndjson'
// todo: DRY with vbb-rest/routes/stations.js?
const toNdjsonBuf = (data) => { const toNdjsonBuf = (data) => {
const chunks = [] const chunks = []
let i = 0, bytes = 0 let i = 0, bytes = 0