0.0.13 • Published 6 years ago

test-oss-prefix v0.0.13

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

oss-cnpm

NPM version build status Test coverage David deps npm download

oss wraper for cnpmjs.org NFS

Usage

const oss = require('oss-cnpm');

const client = oss.create({
  accessKeyId: 'your id',
  accessKeySecret: 'your secret',
  // change to your endpoint
  endpoint: 'oss-cn-shenzhen.aliyuncs.com',
  bucket: 'your bucket',
  mode: 'public or private',
  prefix: 'subdir in your bucket',
});

Cluster mode

const oss = require('oss-cnpm');

const client = oss.create({
  mode: 'public or private',
  schedule: 'masterSlave or roundRobin', // defualt is masterSlave
  cdnBaseUrl: null, // set your custom cdn baseUrl, like `https://cdn.npm.taobao.org/`
  defaultHeaders: {
    'Cache-Control': 'max-age=0, s-maxage=86400',
  },
  cluster: [
    {
      accessKeyId: 'your id1',
      accessKeySecret: 'your secret1',
      endpoint: 'oss-cn-shenzhen.aliyuncs.com',
      bucket: 'your bucket1',
    },
    {
      accessKeyId: 'your id2',
      accessKeySecret: 'your secret2',
      endpoint: 'oss-cn-hangzhou.aliyuncs.com',
      bucket: 'your bucket2',
    },
  ],
});

Test keys

https://github.com/cnpm/oss-cnpm/wiki

License

MIT

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago