Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hapi-lbstatus

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-lbstatus - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

2

index.js

@@ -11,3 +11,3 @@ var service = require('./lib/provider');

service.lbstatus(plugin.servers, options, function(result){
reply(result).code(200);
reply(result.body).code(result.code);
});

@@ -14,0 +14,0 @@ }

@@ -46,4 +46,4 @@ var fs = require("fs"),

}, function(){
var failures = results.filter(function(i){ return i === false; });
callback(failures.length === 0 ? on : off);
var failed = results.filter(function(i){ return i === false; }).length > 0;
callback({ body: failed ? off : on, code: failed ? 503 : 200});
});

@@ -50,0 +50,0 @@ };

{
"name": "hapi-lbstatus",
"version": "2.0.1",
"version": "2.1.0",
"description": "lbstatus plugin for hapi",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -40,2 +40,6 @@ #Hapi lbstatus

Response Codes:
- ON: 200
- OFF: 503
Notes:

@@ -42,0 +46,0 @@

@@ -38,3 +38,4 @@ describe('lbstatus tests', function(){

}, function(result){
result.should.eql('OTWEB_ON');
result.body.should.eql('OTWEB_ON');
result.code.should.eql(200);
done();

@@ -51,3 +52,4 @@ });

}, function(result){
result.should.eql('OTWEB_OFF');
result.body.should.eql('OTWEB_OFF');
result.code.should.eql(503);
done();

@@ -64,3 +66,4 @@ });

}, function(result){
result.should.eql('OTWEB_OFF');
result.body.should.eql('OTWEB_OFF');
result.code.should.eql(503);
done();

@@ -77,3 +80,4 @@ });

}, function(result){
result.should.eql('blarg');
result.body.should.eql('blarg');
result.code.should.eql(200);
done();

@@ -90,3 +94,4 @@ });

}, function(result){
result.should.eql('OTWEB_OFF');
result.body.should.eql('OTWEB_OFF');
result.code.should.eql(503);
done();

@@ -93,0 +98,0 @@ });

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc