@laffery/cos-db
v1.2.0
Published
A useful lib to access COS as a database
Downloads
16
Readme
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
.