waif-sha1-hash
v0.0.2
Published
Microservice to generates an SHA1 hash
Downloads
6
Readme
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');