proper health check
This commit is contained in:
parent
ff7b616377
commit
4dbc097d57
2 changed files with 4 additions and 4 deletions
7
index.js
7
index.js
|
@ -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',
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue