### Execute Healthcheck Script Source: https://github.com/smartiniongithub/fastify-healthcheck/blob/master/README.md Run the healthcheck script from another Node.js project. Specify the web application's healthcheck URL as an argument. If no URL is provided, it defaults to http://localhost:3000/health. ```bash node node_modules/fastify-healthcheck/src/healthcheck http://localhost:8000/health ``` -------------------------------- ### Register Fastify Healthcheck Plugin Source: https://github.com/smartiniongithub/fastify-healthcheck/blob/master/README.md Register the plugin with default options to expose a healthcheck route at '/health'. This is the simplest way to integrate health checks into your Fastify application. ```javascript const fastify = require('fastify')() // example without specifying options, returning a default healthcheck // route mapped to '/health' that only reply to a GET request fastify.register(require('fastify-healthcheck')) // or // example with custom healthcheck url and response to always fail // fastify.register(require('fastify-healthcheck'), { healthcheckUrl: '/custom-health', healthcheckUrlAlwaysFail: true }) // fastify.listen({ port: 3000, host: 'localhost' }) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.