Serve static files with cache busting capability; uses
Express.static()
aka serve-static
Use it just like serve-static except now you can set an additional option named "x" that enables a custom (secret) request header to be used to bypass receiving static files.
- Use in conjunction with
save-static
for caching and re-caching files to disk.
Install
$ npm install --save serve-static-x
Usage
var express = ;var serveStaticX = ; var app = ; var staticPath = path; // <= for example // this is where the magic happensapp;
License
ISC © Buster Collings