@hyu/s3-cnpm
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

s3-cnpm

Build Status codecov

s3 wrapper for cnpmjs.org NFS

It can support the use of OSS COS S3

Usage

npm install @hyu/s3-cnpm
const s3 = require('@hyu/s3-cnpm')

const client = s3.create({
  mode: 'public or private'
  accessKeyId: 'S3 accessKeyId' // COS SecretId or OSS AccessKey ID
  secretAccessKey: 'S3 secretAccessKey' // COS SecretKey or OSS Access Key Secret
  endpoint: 'your service endpoint' // e.g. cos.ap-shanghai.myqcloud.com
  bucket: 'your service bucket name' // e.g. npm
  region: 'your service region' // e.g. ap-shanghai
})

Test

Create an .env file in the project root directory

ACCESS_KEY_ID=SOMETHING
SECRET_ACCESS_KEY=SOMETHING
ENDPOINT=SOMETHING
BUCKET=SOMETHING
REGION=SOMETHING

Liecnse

MIT

Readme

Keywords

Package Sidebar

Install

npm i @hyu/s3-cnpm

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

14.2 kB

Total Files

8

Last publish

Collaborators

  • unrealshadow