egg icon indicating copy to clipboard operation
egg copied to clipboard

[Feature Request] egg.js中,插件、中间件、扩展三者的关系和大致使用场景是什么?

Open LeoFengFromChina opened this issue 6 years ago • 3 comments

Background

不好意思,把这个问题提到了次类别。还望帮忙解答一下。

LeoFengFromChina avatar May 22 '20 08:05 LeoFengFromChina

插件是最小复用单元,中间件和扩展是一种扩展逻辑,可以在 app 也可以在 plugin 也可以在 framework。

可以先看下文档里面 渐进式研发 那章

atian25 avatar May 22 '20 08:05 atian25

插件和中间件的区别是,中间件一定是处理请求相关上下文的,但是插件不一定

hyj1991 avatar May 22 '20 08:05 hyj1991

推荐看下这个 https://eggjs.org/zh-cn/tutorials/progressive.html

hyj1991 avatar May 22 '20 08:05 hyj1991