glitter-sdk-js
Version:
A light client which talks to your Glitter over Http
21 lines (18 loc) • 658 B
JavaScript
let GlitterSdk = require('..')
async function main() {
// get a client
const client = new GlitterSdk()
// show schema
const res = await client.db.get_schema('sample')
console.log("🚀 ~ file: lightNode.js ~ line 7 ~ main ~ res", res)
// put document
// const put_res = await client.db.put_doc('sample', {
// "url": "https://glitterprotocol.io/",
// "title": "A Decentralized Content Indexing Network1",
// })
// // get doc by primary key
// const docs = await client.db.get_doc("sample", "https://glitterprotocol.io/")
// // search doc
// const search_res = await client.db.search("sample", "decentralized")
}
main()