deepexi-platform-sdk
v0.0.2
Published
[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]]
Downloads
4
Readme
egg-deepexi-platform-sdk
Install
$ npm i deepexi-platform-sdk --save
Usage
// {app_root}/config/plugin.js
exports.deepexiPlatformSdk = {
enable: true,
package: 'deepexi-platform-sdk',
};
Configuration
// {app_root}/config/config.default.js
exports.deepexiPlatformSdk = {
logCenter: {
moduleName: '中台名称', // 中台中心名称
rocketmqServer: 'x.x.x.x:9876', // 日志中心rocketmq地址
producerGroup: 'operation-log-producer', // 日志中心生产者组
topic: 'OPERATION_TASK', // 日志中心接收消息topic组
}
};
see config/config.default.js for more detail.
Dependency
SDK对接spaas部分接口,由于抓取当前登录人信息,需要依赖egg-authorization插件,需要确认检查: egg-authorization插件已整合进项目,并且处于enable状态 访问接口时,带有Authorization认证头部
Example
/**
* @OpertionLogAop
* @featureDescription 方法描述
* @functionName 功能模块名称
* ...其他文档注释
*/
async deployment() {
...
const ctx = this.ctx
}
Questions & Suggestions
...