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

connect-server-status

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-server-status - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

CHANGELOG.md

29

index.js

@@ -27,18 +27,15 @@ 'use strict';

function getConnections(server) {
var defer = Promise.defer();
return new Promise(function (resolve, reject) {
function done(concurrentConnections) {
var r = {};
r[server instanceof http.Server ? 'http' : 'https'] = concurrentConnections;
defer.resolve(r);
}
server.getConnections(function (err, concurrentConnections) {
if (err) {
return reject(new Error('Unable to fetch connection status for server: ' + err.message));
}
server.getConnections(function (err, concurrentConnections) {
if (err) {
defer.reject(new Error('Unable to fetch connection status for server: ' + err.message));
}
done(concurrentConnections);
var r = {};
r[server instanceof http.Server ? 'http' : 'https'] = concurrentConnections;
resolve(r);
});
});
return defer.promise;
}

@@ -94,3 +91,3 @@

status(servers, opts.add || {}).then(function (status) {
res.send(status);
res.json(status);
}).catch(function (err) {

@@ -104,3 +101,3 @@ next(err);

if (exists) {
return res.send(503);
return res.sendStatus(503);
}

@@ -113,2 +110,2 @@ sendStatus();

};
};
};
{
"name": "connect-server-status",
"version": "1.0.0",
"version": "2.0.0",
"description": "Server status middleware",

@@ -33,12 +33,12 @@ "main": "index.js",

"dependencies": {
"bluebird": "^2.1.3"
"bluebird": "^3.3.5"
},
"devDependencies": {
"express": "~3.4.7",
"jshint": "~2.4.1",
"mocha": "~1.17.0",
"release-it": "0.0.9",
"should": "~2.1.1",
"supertest": "~0.8.3"
"express": "~4.13.4",
"jshint": "~2.9.1",
"mocha": "~2.4.5",
"release-it": "2.3.1",
"should": "~8.3.0",
"supertest": "~1.2.0"
}
}
}

Sorry, the diff of this file is not supported yet

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