I serve a temporary directory using
var express = require("express");
var serveIndex = require("serve-index");
app.use('/tmp_dir', express.static('/var/www/tmp'));
app.use('/tmp_dir', serveIndex('/var/www/tmp'));
At some point, I may delete /var/www/tmp and think it makes sense to stop serving its content both a static files and as an automatically built index page. Is there a way to do so ? I tried calling app.use with an undefined callback but it raises an error.
Thanks, Marc
express.static()handler or not. – jfriend00 Feb 13 '19 at 06:21