Package Exports
- connect-expires
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (connect-expires) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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-expiresand 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