afb-api-js: first step for javascript bindings
Adds the javascript interpreter duktape 2.3.0
for bindings written in javascript.
This is a first integration. Much more work has to be
done for fully providing an interesting feature.
The option --jsapi allows to load a file that
contains javascript. It exports its verbs using
exports.verbname = function(req, args) ...
where req is the opaque request object and args
is the object representing arguments as returned
by afb_req_json.
The available functions are:
- require(path) module load (ex system = require("afb:system"))
- afb_req_success(req, result, info)
- afb_req_fail(req, status, info)
- result = afb_req_subcall(req, api, verb, args)
Change-Id: I9e6f14acf3c291ce6a56a1fe88e93afbc4089106
Signed-off-by: José Bollo <jose.bollo@iot.bzh>