Skip to content

nazomikan/connect-expires

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

connect-expires

expire middlewae for connect(express)

How to use

var expires = require('/path/to/connect-expires')
  ;

// ...
app.use(expires({
  pattern: /^(?:\/dist\/combine|\/img\/)/,
  duration: 1000 * 60 * 60 * 24 * 15
}));
app.use(express.static(path.join(__dirname, 'public')));
// ...

install connect-expires via npm first:

npm install connect-expires

and then include it in your project with:

var expires = require('connect-expires');

option

  • pattern
    • Patterns of files that adapt
    • Type: RegExp
  • duration
    • Period to adapt the Expires
    • Type: Number (ms)
    • default: one day

About

expire middlewae for connect(express)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published