Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

sit

0.5.1 • Public • Published

sit

NPM version Build Status Dependency Status

A node.js library for micro service based on node-di.

Usage

var sit = require('../');
 
var container = sit.container({
  store: sit.facets.kvstore()
}, {
  store: {
    adapter: 'memory' // or 'redis'
  }
});
 
var store = container.get('store');
var bucket = store.createBucket('sit-example');
bucket.set('foo', 'bar', function (err) {
  if (err) {
    throw err;
  }
  bucket.get('foo', function (err, value) {
    console.log(value); // 'bar'
    bucket.del('foo', function (err) {
      process.exit();
    });
  });
});

License

MIT © Tao Yuan

Keywords

none

install

npm i sit

Downloadsweekly downloads

1

version

0.5.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability