[aerogear-dev] pipeline node.js experiment

Lucas Holmquist lholmqui at redhat.com
Tue May 27 10:27:13 EDT 2014


Last week i decided to start playing around with converting the AeroGear.js Pipeline library to run in node.js

I thought this would be a good place to start when thinking about how ES6 modules work, and how the code would need to be structured.

This is no doubt a WIP, but have a look see here:

https://github.com/lholmquist/aerogear-pipeline

currently it only deals in JSON

For usage checkout the tests. The Usage should be similar but since this is node.js, i’m following some of their conventions for how they do callbacks. The convention is to have a callback where the first argument is the err

an example read:

pipe.read({ id: 1 }, function(err, data, response) {
});
or to read all

pipe.read(function (err, data, response) {
});
and since this is just wrapping a http.request, it will also emit any events the http.request emits

For those wondering about my code style here, i’ve adapted the style from the yeoman project, with 1 difference, 4 spaces instead of 2

I'm not sure what part of the library could be next, datamanager might not make sense here since there is no "client side" storage per say.

I have a WIP implentation of a SimplePush client here: https://github.com/lholmquist/aerogear-simplepush-node-client

Thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20140527/f82adc06/attachment.html 


More information about the aerogear-dev mailing list