sit

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

Usage no npm install needed!

<script type="module">
  import sit from 'https://cdn.skypack.dev/sit';
</script>

README

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