standalone.coffee 414 B

12345678910111213
  1. # execute this script with a redis container running to test the health check
  2. # starting and stopping redis with this script running is a good test
  3. redis = require "../.."
  4. rclient = redis.createClient({host:"localhost",port:"6379"})
  5. setInterval () ->
  6. rclient.healthCheck (err) ->
  7. if err?
  8. console.log "HEALTH CHECK FAILED", err
  9. else
  10. console.log "HEALTH CHECK OK"
  11. , 1000