Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
keystone-healthchecks
Advanced tools
Healthchecks Framework for KeystoneJS (or any Express app)
Enable the default healthchecks for Keystone by adding this package to your project and setting the following option:
keystone.set('healthchecks', true)
Or, you can define your own healthchecks and import them like this:
// this will import all javascript files in the ./healthchecks directory
keystone.set('healthchecks', keystone.import('healthchecks'));
For more control, you can create the healthcheck route handler and plug it into
any express app or router by using the createRoute
method, e.g
const checks = { MyHealthCheck }; // see below
app.use('/is-everything-ok', require('keystone-healthchecks').createRoute(checks));
Each healthcheck should export a Class that extends Healthcheck
, e.g
const healthchecks = require('keystone-healthchecks');
const Healthcheck = healthchecks.Healthcheck;
module.exports = class MyHealthCheck extends Healthcheck {
// optional, will default to the name of the Class
get name () {
return `My Health Check`;
}
// optional, defines a timeout for the check in ms
get timeout () {
return 500;
}
// required, must return a Promise or Promise.resolve for pass or
// Promise.reject for fail. The argument passed to the resolve / reject
// will be returned by the healthcheck endpoint, along with the status
resolver () {
return keepCalmAndCarryOn()
.then(() => Promise.resolve('This is Fine'))
.catch(() => Promise.reject('OMG THIS IS NOT OK'));
}
};
MIT Licensed. Copyright (c) 2017 Thinkmill Pty Ltd
v1.0.0 / 2017-01-18
Initial release.
FAQs
Healthchecks Framework for KeystoneJS (or any Express app)
The npm package keystone-healthchecks receives a total of 2 weekly downloads. As such, keystone-healthchecks popularity was classified as not popular.
We found that keystone-healthchecks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.