1.2.3 • Published 4 years ago
egg-nos-plugin v1.2.3
egg-nos-plugin
This plugin is based on @xgheaven/nos-node-sdk. You can easily operate Netease Object Storage through this plugin.
Install
$ npm i egg-nos-plugin --save
Usage
// {app_root}/config/plugin.js
exports.nos = {
enable: true,
package: 'egg-nos-plugin',
};
Configuration
// {app_root}/config/config.default.js
exports.nos = {
accessKey: 'your-access-key',
accessSecret: 'your-access-secret',
endpoint: 'http://nos-eastchina1.126.net',
defaultBucket: 'nos-test',
};
see config/config.default.js for more detail.
Example
You can use app.nos
or ctx.nos
to access NOS client instance.
app.nos.listBucket();
ctx.nos.listObject();
See more documention at @xgheaven/nos-node-sdk.
Questions & Suggestions
Please open an issue here.