node-streamify
v0.0.8
Published
Stream and transform data using NodeJs native streams
Readme
Streamify
streamify utilises Node Streams and Transformers to build versatile microservice application infrastructures designed for efficient data transfer and processing utilising pipe-n-filters approach.
Installation
npm i -g node-streamify, then call streamify from command line
If you have NATS up and running try streamify FILENAME nats:4222/file-transfer to make a file available for download.
You can then download it (on another machine or tty) using streamify nats:4222/file-transfer copy.txt.
Usage
streamify [[-w worker]] <source> [target]
-w --workera (chain of) workload(s) implementing{ Transform } from 'stream'interface. Optional, multiple choice, order matters. Built-in workers include:-w gzipmaps torequire('node:zlib').createGzip()-w slow [(N,n-N)]slows down throughput by specified ms usingsetTimeout
<source> [target]- If only one option is given it is considered to be the source. The syntax isPROTOCOL:OPTIONS. If the protocol is empty, while the value itself is not, protocol defaults tofile, empty value defaults tostd(stdin for source, stdout for target). Built-in protocols are:stdandfilenats: open source data layer for microservices architecturesstreamify FILENAME nats:4222/file-transferet vice versa
Examples
- homemade
cp:streamify SOURCEFILE COPY
- homemade
cat:streamify FILE
sedwith A LOT of extra hoops (add-w's as you please):FILE | streamify std RESULTFILE
