hello

Sequence that modifies incoming stream of strings by adding Hello.

Description

  • Name: @scramjet/hello
  • Version: 0.23.0
  • Language: javascript
  • Author: pietrzakacper
  • Tags: easy,streaming,data transformation,Data Transformer

Running

❗ Remember to setup transform-hub locally or use the platform's environment for the sequence deployment.

Open two terminals and run the following commands:

The first terminal:

# go to 'hello' directory cd javascript/hello # install dependencies npm install # go back to javascript/ directory cd ../ # deploy 'hello' Sequence si seq deploy hello # see the Instance output si inst output - # nothing happens until some is sent to input

💡NOTE: Command deploy performs three actions at once: pack, send and start the Sequence. It is the same as if you would run those three commands separately:

si seq pack . -o hello.tar.gz # compress 'hello/' directory into file named 'hello.tar.gz' si seq send hello.tar.gz # send compressed Sequence to STH, this will output Sequence ID si seq start - # start the Sequence, this will output Instance ID

The second terminal

# Send file to Instance input steam si inst input - path/to/file/data.txt # if file not given the data will be read from stdin si inst input - # hit enter and type "John" John

Output

# Now you should see "Hello John" in output console $ si inst output - Hello John