Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Service Meddler

Build Status Coverage Status

statd support for node appplications written in typescript

Warining :: WIP

This project is on an early stage and under heavy development. API can change without notice

Configuration

There is a simple factory function that initialize Meddler globaly

import *  as meddler from './meddler';

...

 meddler.configure("localhost",8125,"demoNodeApp") 
 // host and port of the statd server and the name of the application 

Decorators

  • timer: method decorator that cronograph the execution time
  • count: method decorator that count how many times the method is called
  • countKey: same as count but with a custom key

Express support

Automagicaly collects duration and status for each request

import * as meddlerExpress from './express-meddler';
import *  as meddler from './meddler';
    
    class App {

    public express: express.Application;

     constructor() {
        this.express = express();
        this.middleware();
        this.routes();
    }

    private middleware(): void {
        meddler.configure("localhost",8125,"demoNodeApp")
        this.express.use(meddlerExpress.middleware())
    }

    }

Using a reporting service

You can send statd data to a rapero server like Graphite and Grafana and monitor your service stats in real time

## Roadmap
  • Support for hapi

About

statd support for node in typescript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published