Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dotcypress/micro-stats
📊 Tiny statsd helper
https://github.com/dotcypress/micro-stats
Last synced: 3 months ago
JSON representation
📊 Tiny statsd helper
- Host: GitHub
- URL: https://github.com/dotcypress/micro-stats
- Owner: dotcypress
- License: mit
- Created: 2016-12-06T20:22:08.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-11T05:07:00.000Z (over 6 years ago)
- Last Synced: 2024-08-04T00:11:53.057Z (5 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-micro - micro-stats - Statsd helper for Micro. (Modules / Analytics)
README
[![NPM Version](https://img.shields.io/npm/v/micro-route.svg?style=flat-square)](https://www.npmjs.com/package/micro-stats)
[![node](https://img.shields.io/node/v/micro-stats.svg?style=flat-square)](https://www.npmjs.com/package/micro-stats)
[![Build Status](https://img.shields.io/travis/dotcypress/micro-stats.svg?branch=master&style=flat-square)](https://travis-ci.org/dotcypress/micro-stats)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com/)# micro-stats
> 📊 Tiny statsd helper## Installation
Install from NPM:
```js
$ npm install micro-stats --save
```## Examples
```js
const track = require('micro-stats')module.exports = track(function (req, res) {
req.end(200)
})module.exports = track(options, function (req, res) {
req.end(200)
})
```### Options
* `host` - optional statsd host [process.env.STATSD_HOST]
* `port` - optional statsd port [process.env.STATSD_PORT]
* `prefix` - optional statsd prefix ('.' is appended) [process.env.STATSD_PREFIX]
* `tcp` - use TCP instead of UDP