際際滷

際際滷Share a Scribd company logo
Node-RED
@horcicaa
Adam Hoica
http://macgyver.sh.cvut.cz/stredy
Co n叩s ek叩
 Co to je
 Instalace a spu邸tn鱈
 Pou転it鱈
 Roz邸鱈en鱈
kol pro pedn叩邸ej鱈c鱈ho
# 1) Vytvoit si VM
Node-RES
A visual tool for wiring the Internet of Things
 http://nodered.org
Buzzwords
 Visual Programming Language
 Flow Based Programming
 Message Oriented
 Internet of Things
Visual Programing
 Program vznik叩 manipulac鱈 s grafick箪mi prvky
 Ne manipulac鱈 s trapn箪m textem
Node-RED
Node-RED
https://ifttt.com/
Node-RED
Node-RED
Node-RED
Node-RED
Node-RED
Flow based programming
 Dekompozice na funkn鱈 bloky
 鱈zen鱈 toku dat mezi nimi (orientovan箪 graf)
ps aux | grep nodejs | grep -v grep |
awk '{print $2}' | xargs kill
kol pro pedn叩邸ej鱈c鱈ho
# 2) Instalace VM
apt-get install screen git nodejs npm
# 3) TCP Port 80 -> 1880 na VM
Message driven
payload: Hello
message
payload: Hello World
message
Node
Input
(0:1)
Output
(0:N)
Instalace
 Vy転aduje Node.js a npm
 Aktu叩ln Node.js 0.10.x nebo 0.12.x
 http://nodered.org/docs/getting-started/installation.html
kol pro pedn叩邸ej鱈c鱈ho
# 4) Symlink pro node (debian)
ln -s /usr/bin/nodejs /usr/bin/node
# 5) Instalace node-red
npm install -g --unsafe-perm node-red
Spu邸tn鱈
 Nakonfigurovat jako d辿mon
 PM2 - PM2 is a production process manager
for Node.js
Node.js
Jak to funguje
ENGINE
GUI
HTTP
SERVER
kol pro pedn叩邸ej鱈c鱈ho
# 5) Spu邸tn鱈
node-red
 Vstupn鱈 bloky
 Funkn鱈 bloky
 V箪stupn鱈 bloky
Zaj鱈mavj邸鱈 vci
 Subflow
 http://flows.nodered.org/
kol pro pedn叩邸ej鱈c鱈ho
# 6) Instalace admin console
npm install -g node-red-admin
# 7) Instalace freeboard
node-red-admin install
P鱈邸eme vlastn鱈 nody
 Aneb, kdy転 nesta鱈
 Je teba zn叩t JS, HTML, CSS
 Z叩kladn鱈 varianta 2 soubory:
 JS pro backend
 JS+HTML pro editor
 http://nodered.org/docs/creating-nodes/
kol pro pedn叩邸ej鱈c鱈ho
# 8) Zastavit a smazat VM ($$$!)
Dotazy?
@horcicaa
Adam Hoica

More Related Content

Node-RED

Editor's Notes

  • #8: http://blog.interfacevision.com/design/design-visual-progarmming-languages-snapshots/ Program vznik叩 manipulac鱈 s grafick箪mi prvky a ne manipulac鱈 textu
  • #11: Od r叩doby hraek
  • #12: Po enteriprise nasazen鱈 - BPMN
  • #13: Na druhou stranu minecraft