Javascript library to assist in creating blocks on Blockspring.
npm install blockspring
Save the following script to an example.js file:
var blockspring = require('blockspring');
blockspring.define(function(request, response) {
var sum = request.params.num1 + request.params.num2;
response.addOutput('sum', sum);
response.end();
});
Then in your command line write:
node example.js --num1=20 --num2=50
or
echo '{"num1":20, "num2": 50}' | node example.js
MIT
Email us: founders@blockspring.com