0.3.0 • Published 3 years ago

fabric-sdk-node-mongodb-kvs v0.3.0

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

fabric-sdk-node-mongodb-kvs

MongoDB KeyValueStore implementation for Fabric Node.js SDK

Install

npm i fabric-sdk-node-mongodb-kvs

Configuration & Usage in SDK

const Client = require('fabric-client')

Client.setConfigSetting('key-value-store', 'fabric-sdk-node-mongodb-kvs')

// Create KeyValuieStore using the MongoDB options
Client.newDefaultKeyValueStore({
  url: 'mongodb://localhost:27017',
  dbName: 'app',
  collectionName: 'credential'
})

// Create CryptoKeyStore using the MongoDB options
Client.newCryptoKeyStore({
  url: 'mongodb://localhost:27017',
  dbName: 'app',
  collectionName: 'crypto'
});

// Have fun with Fabric

Test

npm run test