omelop-base-gate
Version:
omelop base gate plugin
15 lines (11 loc) • 480 B
text/typescript
import { Application, IPlugin, getPluginHandlerPath, getPluginRemotePath } from 'omelop';
/**
* 实现一个基本的GateWay插件,插件载入时,会被自动扫描handlerPath和remoterPath指向的目录
*/
export class BaseGatePlugin implements IPlugin {
name = 'BaseGatePlugin';
// 在插件里扫描handler目录
handlerPath = getPluginHandlerPath(__dirname);
// 在插件里扫描remoter目录
remoterPath = getPluginRemotePath(__dirname);
}