0
這工作:express.static + middlware = 404
http://localhost:3000/private/test2.html
app.use('/private',express.static(path.join(__dirname, 'private')));
但是當我加入中間件,該頁面無法找到。
var secure = function(req,res,next) {
console.log('in here' + req.url);
next();
}
app.use('/private',secure,express.static(path.join(__dirname, 'private')));
隨着中間件的到位,我得到了404。我在這裏錯過了什麼?
謝謝,我是越來越混雜在一起app.get和app.use –