Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@nymdev/health-check
Advanced tools
Health-check middleware for Express.
Returns either HTTP 200 or 500.
Features
var express = require('express'),
healthCheck = require('@nymdev/health-check');
express.use(healthCheck());
exposes /health-check
with the following information:
{
"nodeVersionExpected": "4.0.0",
"nodeVersionActual": "4.2.1",
"memoryUsage": {
"rss": 66609152,
"heapTotal": 58772224,
"heapUsed": 28870104
},
"uptime": 14.538,
"totalMem": 17179869184,
"freeMem": 1396756480,
"loadAvg": [
1.736328125,
1.65234375,
1.76123046875
],
"heap": {
"total_heap_size": 58772224,
"total_heap_size_executable": 7340032,
"total_physical_size": 58772224,
"total_available_size": 1483938640,
"used_heap_size": 28890440,
"heap_size_limit": 1535115264
},
"host": "<some hostname>"
}
Environment variables can be reported if they're useful.
var express = require('express'),
healthCheck = require('@nymdev/health-check');
express.use(healthCheck({
env: [
'REDIS_HOST',
'ELASTIC_HOST'
]
}));
Can add custom fields to be reported. Thrown errors in custom fields will return a 500.
var express = require('express'),
healthCheck = require('@nymdev/health-check');
express.use(healthCheck({
stats: {
searchExists: function () {
var searchService = require('./search');
return searchService && searchService.ping();
}
}
}));
Missing fields will return a 500.
var express = require('express'),
healthCheck = require('@nymdev/health-check');
express.use(healthCheck({
required: [
'host',
'someName',
'REDIS_HOST'
],
stats: {
someName: someFunction
},
env: [
'REDIS_HOST'
]
}));
npm install --save @nymdev/health-check
FAQs
routes for a standardized health-check
The npm package @nymdev/health-check receives a total of 81 weekly downloads. As such, @nymdev/health-check popularity was classified as not popular.
We found that @nymdev/health-check demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 23 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.