proper health check

This commit is contained in:
Jannis R 2018-11-21 00:00:55 +01:00
parent ff7b616377
commit 4dbc097d57
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
2 changed files with 4 additions and 4 deletions

View file

@ -2,6 +2,7 @@
const createHafas = require('db-hafas')
const createApi = require('hafas-rest-api')
const createHealthCheck = require('hafas-client-health-check')
const pkg = require('./package.json')
const stations = require('./lib/stations')
@ -10,10 +11,8 @@ const station = require('./lib/station')
const hafas = createHafas(pkg.name)
const healthCheck = () => {
return hafas.station('8011306')
.then(st => !!st)
}
const berlinHbf = '8011160'
const healthCheck = createHealthCheck(hafas, berlinHbf)
const config = {
hostname: process.env.HOSTNAME || '2.db.transport.rest',

View file

@ -31,6 +31,7 @@
"db-hafas": "^3.0.1",
"db-stations": "^2.4.0",
"db-stations-autocomplete": "^2.1.0",
"hafas-client-health-check": "^1.0.1",
"hafas-rest-api": "^1.1.0",
"ndjson": "^1.5.0"
},