0.1.0 • Published 13 years ago
dummy-static-middleware v0.1.0
Dummy static middleware for expressjs
which prevents annoying 'not found' errors at development environment.
Installation
npm install dummy-static-middlewareUsage
app.use(express.static('static/'));
app.use(require('dummy-static-middleware')([
{url: /\.(jpeg|jpg|JPG|png|gif)$/, reply: 'static/images/dummy404.png'},
{url: '/some.txt', reply: 'static/dummy.txt'}
]));url could be regular expression or string for exact matching, reply is
path to file which content will be sent in the response.
0.1.0
13 years ago