Using Your Local Node.js Environment to Deploy Blockspring Functions

Install the Blockspring Node.js Module

If you look at the first line of code in block.js, you'll see that it depends on the Blockspring module. This module assists in passing parameters to your function as JSON via STDIN, and provides helpers for defining and calling other Blockspring functions.

To install the module simply use npm install:

$ npm install blockspring
blockspring@0.0.3 node_modules/blockspring
├── mime@1.2.11
├── tmp@0.0.24
├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.10)
└── request@2.47.0 (caseless@0.6.0, json-stringify-safe@5.0.0, forever-agent@0.5.2, aws-sign2@0.5.0, stringstream@0.0.4, oauth-sign@0.4.0, tunnel-agent@0.4.0, node-uuid@1.4.1, qs@2.3.2, mime-types@1.0.2, combined-stream@0.0.7, form-data@0.1.4, tough-cookie@0.12.1, bl@0.9.3, hawk@1.1.1, http-signature@0.10.0)

Blockspring functions can use any module you have installed on your computer when they're executing locally, but a limited number of modules are available for when your function runs in the cloud. Visit available modules for more info.

Now that you have the module installed we can start executing your function locally.