0.1.0 • Published 2 years ago
@egomobile/http-prometheus v0.1.0
@egomobile/http-prometheus
Sets up prom-clients for @egomobile/http-server instances.
Table of contents
Install ↑
Execute the following command from your project folder, where your package.json
file is stored:
npm install --save @egomobile/http-prometheus
Usage ↑
Quick example ↑
import createServer from "@egomobile/http-server";
import { setupPromClient } from "@egomobile/http-prometheus";
const app = createServer();
// this registers a new GET endpoint
// for path `/prometheus`, which uses
// a new `Registry` instance of `prom-client`
setupPromClient(server, "/prometheus");
// ...
await app.listen();
Credits ↑
The module makes use of:
Documentation ↑
The API documentation can be found here.
0.1.0
2 years ago