statd support for node appplications written in typescript
This project is on an early stage and under heavy development. API can change without notice
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
- 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
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())
}
}
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