1.0.0 • Published 8 years ago
moa-plugin v1.0.0
p
app生命周期
- config.pre
- settings
- config.before_settings
- config.after_settings
- global_middlewares
- config.before_global_middlewares
- config.after_global_middlewares
- routes
- config.before_routes
- config.after_routes
- config.post
hook事件
- 启动
- 关闭
- 挂载/移除中间件
- 挂载/移除路由
- 自定义事件
配置
- stub生命周期位置打桩
插件与中间件的区别问题
用法
$ npm i -S xxx-plugin-yyy
in package.json
config:{
xxx-plugin-yyy: {
debug: true
}
}
1.0.0
8 years ago