panter / meteor-healthroute

simple package that adds a route __health that returns when the server is running.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

health route

meteor add panter:healthroute

simple package that adds a route __health for health checks

Custom health routes

You can define custom health checks like this:

import { customHealthChecks } from "meteor/panter:healthroute";

customHealthChecks({
  myCustomCheck: async () => {
    const success = await someAsyncTaskThatReturnsBoolean();
    return success;
  },
  someOtherCheck,
});

each of this checks should return true if everything is alright or return something else (or throw an error) otherwise.

The route will send a 503 if any health check fails.

About

simple package that adds a route __health that returns when the server is running.


Languages

Language:JavaScript 100.0%