Skip to content

Commit

Permalink
Update configuration - add client section (更新配置, 添加client键值)
Browse files Browse the repository at this point in the history
Update npm version to 1.0.3 (更新npm版本号到1.0.3)
  • Loading branch information
jerryhu committed Jan 23, 2019
1 parent b48e5f3 commit 6bd6004
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 22 deletions.
16 changes: 9 additions & 7 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ exports.alicloudMns = {
```js
// {app_root}/config/config.default.js
exports.alicloudMns = {
accountId: '',
accessKeyId: '',
secretAccessKey: '',
region: '', // e.g. 'cn-hangzhou',
secure: true, // use https or http
internal: false, // use internal endpoint
vpc: false, // use vpc endpoint
client: {
accountId: '',
accessKeyId: '',
secretAccessKey: '',
region: '', // e.g. 'cn-hangzhou',
secure: true, // use https or http
internal: false, // use internal endpoint
vpc: false, // use vpc endpoint
},
};
```

Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ exports.alicloudMns = {
```js
// {app_root}/config/config.default.js
exports.alicloudMns = {
accountId: '',
accessKeyId: '',
secretAccessKey: '',
region: '', // e.g. 'cn-hangzhou',
secure: true, // use https or http
internal: false, // use internal endpoint
vpc: false, // use vpc endpoint
client: {
accountId: '',
accessKeyId: '',
secretAccessKey: '',
region: '', // e.g. 'cn-hangzhou',
secure: true, // use https or http
internal: false, // use internal endpoint
vpc: false, // use vpc endpoint
},
};
```

Expand Down
17 changes: 10 additions & 7 deletions config/config.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
exports.alicloudMns = {
app: true,
agent: false,
// accountId: '',
// accessKeyId: '',
// secretAccessKey: '',
// region: '', // e.g. 'cn-hangzhou',
// secure: true, // use https or http
// internal: false, // use internal endpoint
// vpc: false, // use vpc endpoint
// client: {
// accountId: '',
// accessKeyId: '',
// secretAccessKey: '',
// region: '', // e.g. 'cn-hangzhou',
// secure: true, // use https or http
// internal: false, // use internal endpoint
// vpc: false, // use vpc endpoint
// },

};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "egg-alicloud-mns",
"version": "1.0.2",
"version": "1.0.3",
"description": "Alicloud MNS plugin for egg",
"eggPlugin": {
"name": "alicloudMns"
Expand Down
4 changes: 4 additions & 0 deletions test/alicloud-mns.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ describe('test/alicloud-mns.test.js', () => {
it('should get object app.alicloudMns', () => {
assert(app.alicloudMns);
});

it('should have function app.alicloudMns.receiveMessage', () => {
assert(app.alicloudMns.receiveMessage);
});
});
11 changes: 11 additions & 0 deletions test/fixtures/apps/alicloud-mns-test/config/config.default.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
'use strict';

exports.keys = '123456';
exports.alicloudMns = {
client: {
accountId: '123',
accessKeyId: '123',
secretAccessKey: '123',
region: 'cn-hangzhou', // e.g. 'cn-hangzhou',
secure: true, // use https or http
internal: false, // use internal endpoint
vpc: false, // use vpc endpoint
},
};

0 comments on commit 6bd6004

Please sign in to comment.