@laffery/cos-db
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

COS DB

A database based on Tencent COS

Demo

import COSClient from "@laffery/cos-db";

const config = {
  secret: {
    id: "xxx",
    key: "xxx",
  },
  bucket: "xxx",
  region: "ap-xxx",
};

const cos = new COS(config);

(async () => {
  const res = await cos.list("/test");
  console.log(res);
})()

(async () => {
  const res = await cos.put("/test/a.json", '{\n\t"key": "hello world"\n}');
  console.log(res);
})();

(async () => {
  const res = await cos.delete("/test/a.json");
  console.log(res);
})();

Issues

Any questions or good ideas, add your issues here, with a milestone @laffery/cos-db.

Readme

Keywords

Package Sidebar

Install

npm i @laffery/cos-db

Weekly Downloads

0

Version

1.2.0

License

MIT

Unpacked Size

4.38 kB

Total Files

4

Last publish

Collaborators

  • laffery