waif-sha1-hash

0.0.2 • Public • Published

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');

/waif-sha1-hash/

    Package Sidebar

    Install

    npm i waif-sha1-hash

    Weekly Downloads

    0

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • adrianrossouw