You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even if not directly a problem due to Poet, I noticed that most of the exemple files contain app.use(app.router);. The thing is, with Express 3, registering a new route will automatically add the router middleware to the stack if not already present. So, doing it explicitly after the Poet instantiation will result in adding a second router middleware to the stack (a simple console.log(app.stack); will show this).
Another issue is that, if one would like to add some middlewares (as order matters) before/after the router one, one would actually instantiate Poet at the bottom right before any additional Express routes if any.
What do you think about that?
The text was updated successfully, but these errors were encountered:
Aha. Instantiating Poet at the top of app.js caused express multipart file uploads to break, quietly turning req.files into undefined. Moving it to the bottom resolve that nicely.
Hello,
Thanks for the great work, Poet is awesome!
Even if not directly a problem due to Poet, I noticed that most of the exemple files contain
app.use(app.router);
. The thing is, with Express 3, registering a new route will automatically add the router middleware to the stack if not already present. So, doing it explicitly after the Poet instantiation will result in adding a second router middleware to the stack (a simpleconsole.log(app.stack);
will show this).Another issue is that, if one would like to add some middlewares (as order matters) before/after the router one, one would actually instantiate Poet at the bottom right before any additional Express routes if any.
What do you think about that?
The text was updated successfully, but these errors were encountered: