-
-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build a list of native or Polka-compatible middleware #85
Comments
I can share the ones that I'm using:
|
Recently made onewaydata compatible with polka |
multer seem to bug with polka (unhandled promises when the fileSize limit is reached). I use make-promises-safe so my server as been shutted down. I guess there is a problem around how the error is handled in the inner multer middleware. |
@fraxken what version of polka? can you provide a small repo? |
@lukeed https://github.com/fraxken/polka_multer At first i failed to reproduce the problem (so i get back to my project to reproduce on it and found what could produce a difference). The bug only appear if i create a new polka instance at create the route on it const app = polka({ onError });
const router = polka();
router.post("/avatar", upload.single("avatar"), async (req, res) => {
});
app.use("/api", router); Make no sense to do this in the reproduction sure (but in my app i require many "sub-routes" to use them in the /api namespace). It produce the following error
Maybe i missed something on how to use this properly.. not sure. Best Regards, |
Work for me to avoid Server crashed
More information |
I build a lightweight and extendable body-parser like middleware: |
Pretty much what it says on the title. It would be awesome to know which middlewares are compatible with Polka or made exclusively with Polka in mind.
So far I haven't found any, but maybe some middleware can break while running on Polka because it uses IncomingMessage and ServerResponse while Express uses their own implementation of a request module and a response module.
If deemed unnecessary, the issue can be closed. But for now, here are the lists:
Native to Polka
Compatible, tested by the creator
Compatible, tested by users
Incompatible
The text was updated successfully, but these errors were encountered: