0.0.2 • Published 10 years ago

waif-sha1-hash v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

waif-sha1-hash

Really simple example microservice for waif.

Usage

var hash = waif('hash');


hash('my-string', function(err, resp, body) {
  console.log(body); // { input: 'my-string', hash: 
});

Declaring

Waif allows you to re-use the same microservices in various ways.

You can use it as a module :

// file: some-service/devel.js
waif('hash')
  .use(require('waif-sha1-hash'))
  .listen();

You can expose it as a external service :

// file: ./prod.js
waif('hash')
  .use(require('waif-sha1-hash'))
  .listen(3000);

You can mount an external instance in your app :

// file: some-service/prod.js
waif('hash')
  .forward('http://api.example.com/sha1');
0.0.2

10 years ago