Socket
Socket
Sign inDemoInstall

btrz-health-check

Package Overview
Dependencies
2
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.6.1 to 1.7.1

src/sequelize-health-checker.js

1

index.js

@@ -7,1 +7,2 @@ "use strict";

exports.SQSHealthChecker = require("./src/sqs-health-checker").SQSHealthChecker;
exports.SequelizeDbHealthChecker = require("./src/sequelize-health-checker").SequelizeDbHealthChecker;

4

package.json
{
"name": "btrz-health-check",
"version": "1.6.1",
"version": "1.7.1",
"description": "A series of classes that will ping different service types to verify accessibility.",

@@ -10,3 +10,3 @@ "main": "index.js",

"scripts": {
"test": "NODE_ENV=test BUILD_NUMBER=123456789 node_modules/istanbul/lib/cli.js cover node_modules/mocha/bin/_mocha -- --ui bdd -t 5000",
"test": "NODE_ENV=test BUILD_NUMBER=123456789 node_modules/istanbul/lib/cli.js cover node_modules/mocha/bin/_mocha -- --ui bdd -t 5000 --exit",
"test-w": "NODE_ENV=test BUILD_NUMBER=123456789 node_modules/mocha/bin/mocha -w",

@@ -13,0 +13,0 @@ "publish": "publish"

@@ -108,1 +108,25 @@ # btrz-health-check [![Circle CI](https://circleci.com/gh/Betterez/btrz-health-check.svg?style=svg)](https://circleci.com/gh/Betterez/btrz-health-check) [![NPM version](https://badge-me.herokuapp.com/api/npm/btrz-health-check.png)](http://badges.enytc.com/for/npm/btrz-health-check)

The config can also contains a `timeout` property and it will be use to fail in case the timeout is reached, the default value is 5000.
### Sequelize
Will check connectivity to the Sequelize DB doing a call to authenticate.
{name: "Sequelize DB", status: 200} //if promise resolves
{name: "Sequelize DB", status: 500} //if promise rejects
#### Usage
const SequelizeDbHealthChecker = require("btrz-health-checker").SequelizeDbHealthChecker,
sequelizeChecker = new SequelizeDbHealthChecker(sequelize);
sequelizeChecker.checkStatus()
.then((result) => {
//working fine
})
.catch((result) => {
//Something is not right.
});
The only mandatory parameter is an instance of sequelize.
Internally we will call the `authenticate()` function along with a valid sequelize config, so it should at least implement that function with a valid DB config.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc