https://github.com/deployable/node-deployable-express-meta-data
Attach standard meta data to express requests
https://github.com/deployable/node-deployable-express-meta-data
express metadata nodejs npm-module request
Last synced: about 1 month ago
JSON representation
Attach standard meta data to express requests
- Host: GitHub
- URL: https://github.com/deployable/node-deployable-express-meta-data
- Owner: deployable
- Created: 2017-01-06T11:03:29.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-31T00:24:51.000Z (about 9 years ago)
- Last Synced: 2025-06-05T06:58:55.143Z (8 months ago)
- Topics: express, metadata, nodejs, npm-module, request
- Language: JavaScript
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [express-meta-data](https://github.com/deployable/node-deployable-express-meta-data)
Express Meta Data provides middleware that attaches useful metadata to express requests.
Every request has a `request_id` assocatiated with it
Requests are timed and can be logged at start/stop
Running requests are tracked
### Install
npm install deployable-express-meta-data --save
yarn add deployable-express-meta-data
### Usage
```javascript
const emd = require('deployable-express-meta-data')
const app = require('express')()
// Conn and Requst Tracking
app.use( ExpressMetaData.singleton.genMiddleware() )
app.get('/', (req,res) => res.json(req._emd.request_id))
```
### License
deployable-express-meta-data is released under the MIT license.
Copyright 2016 Matt Hoyle - code at deployable.co
https://github.com/deployable/deployable-express-meta-data