Comments (4)
https://github.com/cnpm/cnpmcore/blob/master/app/infra/QueueAdapter.ts#L18 可以参考。
from tegg.
https://github.com/cnpm/cnpmcore/blob/master/app/infra/QueueAdapter.ts#L18 可以参考。
老哥,我参考的就是这个,这个用的官方egg-redis插件,我自定义插件就报错。
from tegg.
自定义插件可以通过ctx带过去 @context() ctx: EggContext,
from tegg.
现在是通过 https://github.com/eggjs/tegg/blob/master/plugin/tegg/lib/EggAppLoader.ts#L109 这里遍历 context 上的 properties 来实现的。
如果插件不是通过 extends 来实现,就没法找到了。
from tegg.
Related Issues (20)
- 如何获取context HOT 4
- 官网文档在哪啊 HOT 1
- 实现控制器拦截器注解 HOT 1
- 请问中间件怎么调用service HOT 2
- tegg-orm-decorator 和 sequelize怎么一起使用 HOT 1
- beginModuleScope获取不到 HOT 2
- 【addSingleton 注册插件报的一个错】:当注册 async function时,function内使用await报错 HOT 5
- egg-redis HOT 1
- 配置项目 module 使用 `pkg` 报错,与README文档不符,这里是否只支持`package`? HOT 3
- 使用装饰器如 @SingletonProtoInit 方式来注册 init 函数
- 装饰器问题 HOT 1
- windows下引入模块失败
- [Feature] 这个是为了兼容 egg 插件吗,存了属性名,而不是把 Clazz 作为 ID 放到 Container HOT 2
- config.default.ts中配置中间件 HOT 3
- [Feature Request] 使用 egg-typebox-validate 作为默认的参数校验插件 HOT 6
- [Feature Request] 提供更加简单化请求方法的修饰器 HOT 11
- [RFC] 增强Controller能力与相关HttpMethod HOT 14
- eventbus 的单测接口在真实应用中无法提示
- what happens the lastest version of tegg just won't work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tegg.