Skip to content

statszee/statszee-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StatsZee Data Collector for Node

Known Vulnerabilities Build status Dependency Status Code Climate

Data Collector for statszee, a self-hosted stats server based Node.JS and Sequelize made with trails.js framework

WARNING: Not suitable for production

Work in progress, things are going to change

Installation

Run inside a node project

npm install --save statszee-node

Instance the tracker

const statszeeCollector = require("statszee-node")
const statszeeCollectorInstance = new statszeeCollector({
  key: ""     // your statszee server key
  baseUrl: "" // your statszee server basepath
})

Track data in your code

statszeeCollectorInstance.addPoint("event.name")                  // defaults value=1, precision=1h
statszeeCollectorInstance.addPoint("event.name","7")              // defaults precision=1h
statszeeCollectorInstance.addPoint("event.name","9","1d")         // no defaults
statszeeCollectorInstance.addPoint("event.name","9",["1d","1h"])  // multiple precision  

License

MIT