npm install -g npmbox … instalace nmpbox balicku
npmbox npmbox … stahne npmbox a zavislosti do balicku
npm install pm2 -g … nainstaluje se libovolny balik, treba pm2
npmbox pm2 … zabali se nainstalovany balik
scp npmbox.npmbox pm2.npmbox root@offline-server:. … pretahne se balicek npmbox.npmbox a pm2 na vzdaleny offline server
ssh root@offline-server … pripojime se na server
tar –no-same-owner –no-same-permissions -xvzf npmbox.npmbox … rozbali se archiv
npm install –global –cache ./.npmbox.cache –optional –cache-min 99999999999 –shrinkwrap false npmbox … nainstaluje se obsah balicku - npmbox
npmunbox pm2.npmbox –global … nainstaluje se pm2 z baliku
npm cache clear
npm install -g package.x.y.z
scp -R /.npm/* /cache-whatever-folder
npm cache clear
npm install –global –cache /cache-whatever-folder –optional –cache-min 99999999999 –shrinkwrap false package.x.y.z
offline-npm … dalsi alternativa
node-red … skript na systemd (systemctl) sluzbu
/usr/local/lib/node_modules/node-red/settings.js … globalni nastaveni
~/.node-red/settings.js … lokalni nastaveni
cd /usr/local/lib/node_modules; node -e “console.log(require('bcryptjs').hashSync(process.argv[1], 8));” “aaa” … vygeneruje heslo
openssl genrsa -out privkey.pem
openssl req -new -x509 -key privkey.pem -out cert.pem -days 1095
Nastaveni https, ldap, ...
Reverse proxy pro Node-Red
How to backup flows and related configuration … backup a restore Nodered
context.get('count') … nacte promennou count (lokalni v nodu)
flow.set('count', hodnota) … zapise do promenne count hodnotu promenne hodnota (lokalni v celem flow)
global.get('count') … nacte globalni promennou count
return {payload : msg.payload.a.b[1].cislo } vrati hodnotu nactenou ze vstupu (msg.payload) a protoze to je objekt, referuji na konkretni vlastnost objektu
msg = { payload : "Obsah mailu" + Date().toString(), topic : "Subject", to : "1@a.b, 2@a.b", cc : "3@a.b" bcc : "4 @a.b" }; return m sg
forEach (array iteration & completion)
node-red-contrib-actionflows
GPIOd - ovladani GPIO sbernice na Raspberry
Node-red web page – an example to get you started - jednoduche webove stranky s daty z casovace
Work with cookies - ukazka prace s cookies]]
How to Build a Great Chat Application With Node-RED and Websockets\\
[[https://github.com/TotallyInformation/node-red-contrib-uibuilder|A Node-RED web user interface builder - vytvareni uzivatelskeho prostredi s NodeRed - priklad s JQuery, Riot, MoonJS, Umbrella JS
Workflow based visual programming with Node RedPrace s MongoDB
Mongodb et Node-red … Videa od François Riotte
Node-RED Design Patterns … popisy Node-Red konstrukci
Node-RED Forms and Templates
Node-RED Dashboard Template Examples (AngularJS)
Authenticating Node-RED with JSONWebToken - popis i animovane obrazky
Authenticating Node-RED using JSONWebToken - Part 2 - popis i animovane obrazky
5-minute Signup Forms with Node-RED and Compose - popis i animovane obrazky
Power Prototyping with MongoDB and Node-RED - popis i animovane obrazky
Quick Connections for MongoDB with Node-RED - popis i animovane obrazky
]]