Skip to content

Commit

Permalink
feat:完善readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoutianlei-shadow committed May 6, 2019
1 parent f73b45c commit 9b62193
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $ npm i egg-cos-promise --save

```js
// {app_root}/config/plugin.js
exports.cosPromise = {
exports.cos = {
enable: true,
package: 'egg-cos-promise',
};
Expand All @@ -44,7 +44,13 @@ exports.cosPromise = {

```js
// {app_root}/config/config.default.js
exports.cosPromise = {
config.cos = {
client: {
secretId: '',
secretKey: '',
region: '',
bucket: ''
}
};
```

Expand Down
6 changes: 3 additions & 3 deletions README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ egg-cos-promise 版本 | egg 1.x

```js
// config/plugin.js
exports.cosPromise = {
exports.cos = {
enable: true,
package: 'egg-cos-promise',
};
```

## 使用场景

- Why and What: 描述为什么会有这个插件,它主要在完成一件什么事情。
- Why and What: 腾讯云的cos的sdk不支持promise的写法,所以有了这个插件
尽可能描述详细。
- How: 描述这个插件是怎样使用的,具体的示例代码,甚至提供一个完整的示例,并给出链接
- How: 对接腾讯云的cos的时候可以选择使用此插件。插件支持promise和async

## 详细配置

Expand Down
11 changes: 8 additions & 3 deletions config/config.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
* @member Config#cos
* @property {String} SOME_KEY - some description
*/
exports.cos = {

};
config.cos = {
client: {
secretId: '',
secretKey: '',
region: '',
bucket: ''
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "egg-cos-promise",
"version": "1.0.3",
"version": "1.0.5",
"description": "tencent cloud cos plugin for egg, support promise and async",
"eggPlugin": {
"name": "cosPromise"
Expand Down

0 comments on commit 9b62193

Please sign in to comment.