Skip to content

Yolean/promparse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

promparse

This is a super primitive Prometheus text format parser, created as an example of how we can share a lib between Deno and Node.

There are other Prometheus parsers.

boilerplate

npm install --save-dev --save-exact --ignore-scripts jest typescript @tsconfig/deno ts-jest @types/jest
./node_modules/.bin/ts-jest config:init

use from Deno

#!/usr/bin/env -S deno run --allow-net
// TODO insert git ref instead of master here
import promparse from 'https://github.com/Yolean/promparse/raw/master/src/promparse.ts';
const scrape = await fetch('http://localhost:8080/metrics');
console.log(promparse(await scrape.text()));

use from Node

npm install @yolean/promparse

About

A crappy lib, but it explores Deno && Node compatibility

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published