difference between flash, connect-flash and express-flash

烂漫一生 提交于 2019-12-04 04:40:29

There really is no drastic difference between the three packages. They all accomplish the same thing in their own way. The difference between the three are:

  1. flash is written by the Express team, making it an official middleware for Express.
  2. connect-flash as stated from the README:

This middleware was extracted from Express 2.x

So in a sense this is similar to flash except a legacy version of it from Express 2.x days. However, the name suggests it was meant for the Connect framework, but usually any connect-* packages work fine with Express.

  1. express-flash is just a wrapper around connect-flash. You can see that in the source code here.

Out of all three, connect-flash seems to be the most used judging from npm stats.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!