New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fastify-healthcheck

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-healthcheck - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

5

CHANGELOG.md
# Change Log
## [0.1.1](https://github.com/smartiniOnGitHub/fastify-healthcheck/releases/tag/0.1.1) (2018-11-13)
Summary Changelog:
- Maintenance release to fix Fastify dependencies to '1.x' to avoid breaking changes because Fastify '2.x' will be released soon
- Updated dependencies to latest Fastify plugin (1.2.1) and Fastify 1.x (1.13.0)
## [0.1.0](https://github.com/smartiniOnGitHub/fastify-healthcheck/releases/tag/0.1.0) (2018-10-31)

@@ -4,0 +9,0 @@ Summary Changelog:

6

example/example.js

@@ -33,8 +33,8 @@ /*

const stream = fs.createReadStream(path.join(scriptRelativeFolder, 'home.html'))
reply.type('text/html').send(stream)
reply.type('text/html; charset=utf-8').send(stream)
})
fastify.listen(3000, '0.0.0.0', (err) => {
fastify.listen(3000, '0.0.0.0', (err, address) => {
if (err) throw err
console.log(`server listening on ${fastify.server.address().port}`)
console.log(`Server listening on ${address}`)
})

@@ -41,0 +41,0 @@

{
"name": "fastify-healthcheck",
"version": "0.1.0",
"version": "0.1.1",
"description": "Fastify Plugin to serve responses for health checks",

@@ -24,6 +24,6 @@ "main": "src/plugin",

"dependencies": {
"fastify-plugin": "^0.2.2"
"fastify-plugin": "^1.2.1"
},
"devDependencies": {
"fastify": "^0.43.0",
"fastify": "^1.13.0",
"simple-get": "^3.0.3",

@@ -30,0 +30,0 @@ "standard": "^12.0.1",

# fastify-healthcheck
[![NPM Version](https://img.shields.io/npm/v/fastify-healthcheck.svg?style=flat)](https://npmjs.org/package/fastify-healthcheck/)
[![NPM Downloads](https://img.shields.io/npm/dm/fastify-healthcheck.svg?style=flat)](https://npmjs.org/package/fastify-healthcheck/)
[![Code Style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
[![Coverage Status](https://coveralls.io/repos/github/smartiniOnGitHub/fastify-healthcheck/badge.svg?branch=master)](https://coveralls.io/github/smartiniOnGitHub/fastify-healthcheck/?branch=master)
Fastify Plugin to serve responses that report about the web application,

@@ -38,4 +43,7 @@ if it's still running and alive (health checks).

// To test, for example (in another terminal session) do:
// curl http://127.0.0.1:3000/health => returning an HTTP response 200 (OK)
// `curl http://127.0.0.1:3000/health` => returning an HTTP response 200 (OK)
// and a JSON response like: {"statusCode":200,"status":"UP"}
// or run the healthcheck script, for example with:
// `node src/healthcheck http://localhost:3000/health`
// and get the same HTTP response seen before
```

@@ -53,9 +61,9 @@

like in the following sequence:
- docker:build, to build the image
- docker:run, to start the container from generated image, in detached mode
- docker:healthcheck-manual, to run the healthcheck script in the container but manually
- docker:status, to get the health status of the container
- and others like: docker:inspect (interactive), docker:log (<CTRL>C to close), docker:process, etc ...
- docker:stop, to stop running container
- docker:clean, to remove generated image
- `docker:build`, to build the image
- `docker:run`, to start the container from generated image, in detached mode
- `docker:healthcheck-manual`, to run the healthcheck script in the container but manually
- `docker:status`, to get the health status of the container
- and others like: `docker:inspect` (interactive), `docker:log` (<CTRL>C to close), `docker:process`, etc ...
- `docker:stop`, to stop running container
- `docker:clean`, to remove generated image

@@ -65,3 +73,3 @@

Fastify 0.43.0 or later.
Fastify 1.x .

@@ -68,0 +76,0 @@

@@ -44,6 +44,6 @@ /*

if (healthcheckUrlAlwaysFail === false) {
reply.type('application/json').send({ statusCode: 200, status: 'UP' })
reply.send({ statusCode: 200, status: 'UP' })
} else {
// unless plugin option to always fail is raised
reply.code(500).type('application/json').send({ statusCode: 500, status: 'DOWN' })
reply.code(500).send({ statusCode: 500, status: 'DOWN' })
}

@@ -56,4 +56,4 @@ }

module.exports = fp(fastifyHealthchecks, {
fastify: '>=0.43.0',
fastify: '1.x',
name: 'fastify-healthcheck'
})
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