Skip to content

Instantly share code, notes, and snippets.

@jgensler8
Last active April 16, 2016 02:17
Show Gist options
  • Save jgensler8/bd48450c3af2f9843f9496ef1a10d5d3 to your computer and use it in GitHub Desktop.
Save jgensler8/bd48450c3af2f9843f9496ef1a10d5d3 to your computer and use it in GitHub Desktop.
var microlib = require('microlib');
module.exports = {
addTwoMicroservice: microlib.builder
.setFunction(function(one, two) {
return one + two;
})
.build()
// spinUpON is provided by the builder
}
var addTwoMS = require('addTwoMicroservice');
addTwoMS
// we have to create the service
.spinUpOn(os.environ.GIVE_ME_IT_SERVICE_URL)
.then(function(service) {
return service.addTwo(4,5) === service.addTwo(5,4);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment