Skip to content

Commit

Permalink
fix: update dependencies, typo on README
Browse files Browse the repository at this point in the history
  • Loading branch information
jmtavares committed Jul 12, 2018
1 parent dfa9bab commit a40d1cc
Show file tree
Hide file tree
Showing 10 changed files with 6,941 additions and 113 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
.nyc_output
coverage
.history
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
README.md
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 Statful
Copyright (c) 2018 Statful

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
![statful](https://avatars1.githubusercontent.com/u/20299158?v=3&s=200)
![expressjs](https://camo.githubusercontent.com/b0c9dc0e2f5bcd190403159a24d4a541e496e30a/68747470733a2f2f636f6c69676f2e696f2f696d616765732f657870726573732e737667)

# statful-middleware-express

A common pattern in expressjs/restify applications it to gather response times from all received requests, this middleware takes care of collecting common useful metrics automatically.
A common pattern in expressjs/restify applications it to gather response times from all received requests, this middleware takes care of collecting common useful metrics automatically.

[![npm version](https://badge.fury.io/js/statful-middleware-express.svg)](https://badge.fury.io/js/statful-middleware-express) [![Build Status](https://travis-ci.org/statful/statful-middleware-express.svg?branch=master)](https://travis-ci.org/statful/statful-middleware-express)

Expand All @@ -11,19 +12,22 @@ A common pattern in expressjs/restify applications it to gather response times f
```shell
npm install --save statful-middleware-express statful-client
```

```shell
yarn add statful-middleware-express statful-client
```

## Getting started

```js
const express = require('express');
const Statful = require('statful');
const statfulMiddleware = require('statful-middleware-express');
const express = require("express");
const Statful = require("statful-client");
const statfulMiddleware = require("statful-middleware-express");

const app = express();
const statful = new Statful({ /* statful configuration */ });
const statful = new Statful({
/* statful configuration */
});

app.use(statfulMiddleware(statful));
app.listen(3000);
Expand All @@ -37,11 +41,11 @@ Most of the configuration is done directly in the statful instance. You can read

By default, the follow metrics are collected, with the corresponding tags:

* `response_time`
* `hostname`,
* `method`: `GET`, `POST`, `PUT`...
* `statusCode`: 200, 400, 404 ...
* `route`: Either the route handler's name, the route path or `unknown_route`. e.g.: `/users/:id?`
- `response_time`
- `hostname`,
- `method`: `GET`, `POST`, `PUT`...
- `statusCode`: 200, 400, 404 ...
- `route`: Either the route handler's name, the route path or `unknown_route`. e.g.: `/users/:id?`

## Authors

Expand Down
Loading

0 comments on commit a40d1cc

Please sign in to comment.