node.js - Placement of static middleware in express 4 -
i see express 4 not need app.use(app.router). combined app.get/post(). in case, should define static middle-ware after app.[verb]() calls?
app.use(express.static(path.join(__dirname, 'public'))); i assume keeping before hurts performance each request may need file lookup.
usually want @ top requests files don't accidentally match routes , such.
node.js performance express express-4
No comments:
Post a Comment