morikat / node-red-contrib-nats

MIT License
1 stars 2 forks source link

Info #4

Open jabrena opened 9 years ago

jabrena commented 9 years ago

Hi,

I was checking the project, but I don't understand the utility. What features offers nats.js in a CF environment?

Many thanks in advance.

Juan Antonio

morikat commented 9 years ago

I am sorry that README was not enough.

This project is nats client for the Node-RED It supports the nats-pub and nats-sub

How to Use

step1: nats-server run

$ nats-server -a 192.168.1.100 -p 4222 --user nats --pass nats

step2: install node-red & npm install node-red-contrib-nats

$ git clone https://github.com/node-red/node-red
$ cd node-red
$ npm install
$ npm install node-red-contrib-nats --save
$ node red.js -v

step3: edit flow

nats-node

nats-node-setting

step4: deploy flow

deploy

step5:

publish test message

$ nats-pub -s nats://nats:nats@localhost:4222/ 'dea.advertise' 'dea message sample'
Published [dea.advertise] : 'dea message sample'

step6:

result output-nats-message

morikat commented 9 years ago

@jabrena Does that answer your question?

jabrena commented 9 years ago

Yes, last week, I was researching a bit about node-red. It seems interesting. Are you using it?

morikat commented 9 years ago

Node-RED is very interesting I'm running on the Cloud Foundry and Raspberry Pi.

jabrena commented 9 years ago

Cloud foundry is able to run on RPI2?

morikat commented 9 years ago

Oh. . . I'm sorry it is a another system my cloud foundry running on bosh-lite(ubuntu14.04)