Skip to content

Commit

Permalink
Add bin
Browse files Browse the repository at this point in the history
  • Loading branch information
HDegroote committed Jul 18, 2024
1 parent 59415a4 commit 6d52e69
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ Note: `/etc/prometheus/config/prometheus-dht-targets` should be writable by the

#### CLI

Install:
```
DHT_PROM_PROMETHEUS_TARGETS_LOC=path/to/prometheus/targets.json DHT_PROM_HTTP_PORT=30000 DHT_PROM_SHARED_SECRET=<A 64 character hex string> dht-prometheus
npm i -g dht-prometheus
```

## Install

Run:
```
npm i dht-prometheus
DHT_PROM_PROMETHEUS_TARGETS_LOC=path/to/prometheus/targets.json DHT_PROM_HTTP_PORT=30000 DHT_PROM_SHARED_SECRET=<A 64 character hex string> dht-prometheus
```

## Test
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"name": "dht-prometheus",
"version": "0.0.0",
"description": "Bridge to scrape Prometheus metrics exposed over hyperdht",
"description": "Bridge to scrape Prometheus metrics fully peer to peer",
"main": "index.js",
"scripts": {
"test": "standard && brittle test/test.js && ./prep-integration-test.sh && brittle test/integration.js"
},
"bin": {
"dht-prometheus": "./run.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/HDegroote/dht-prometheus.git"
Expand Down
2 changes: 2 additions & 0 deletions run.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /usr/bin/env node

const HyperDHT = require('hyperdht')
const PrometheusDhtBridge = require('./index')
const pino = require('pino')
Expand Down

0 comments on commit 6d52e69

Please sign in to comment.