Skip to content
This repository was archived by the owner on Apr 6, 2019. It is now read-only.

ramlmn/taggart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

taggart

Note: Please have a look at this commit, any help is appreciated.

An ETag header middleware for express like apps. It is a zero dependency middleware which generates ETags accurately.

Installation

$ npm install --save @ramlmn/taggart

Usage

const express = require('express');
const taggart = require('@ramlmn/taggart');

const app = express();

app.use(taggart);

app.use(...);
...

Working

taggart simply overrides the write, end and send methods of the res (ServerResponse object) and tries to gather around the response content being sent to the client, at the end, taggart adds the ETag header to the response if it is't buffered or tansfered in chunks.

License

MIT

About

An ETag header middleware for express like apps

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •