2019-10-15 Afternoon essay 逃离我推掉我的手 2023-06-08 02:37 6阅读 0赞 ## AfterNoon ## ## Node Red ## * a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways. * browser-based flow editing ![avatar][] * based node.js * stored using JSON ### Install ### * node.js [https://nodejs.org/en/][https_nodejs.org_en] * Installing with npm npm install -g --unsafe-perm node-red * Installing with docker docker run -it -p 1880:1880 --name mynodered nodered/node-red * Installing with snap sudo snap install node-red ### Running ### $ node-red then open the browser at [http://localhost:1880][http_localhost_1880] * command-line usage <table> <thead> <tr> <th>option</th> <th>description</th> </tr> </thead> <tbody> <tr> <td>-p,–port PORT</td> <td>set the TCP port,default 1880</td> </tr> <tr> <td>–safe</td> <td>start node red without startting flows</td> </tr> <tr> <td>–s,–settings File</td> <td>setting the settings file ,default settings.js in userDir.</td> </tr> <tr> <td>-title TITLE</td> <td>set process window title</td> </tr> <tr> <td>-u,–userDir Dir</td> <td>set the user directory to user,default ~/.node-red</td> </tr> <tr> <td>-v</td> <td>enables verbose output</td> </tr> <tr> <td>-?,–help</td> <td>shows command-line usage help and exists</td> </tr> </tbody> </table> default flows file flows\_.json * update npm install -g --unsafe-perm node-red ## hello world ## * Access the editor [http://localhost:1880][http_localhost_1880] or [http://<ip-address>:1880][http_ip-address_1880] * Add an Inject node * Add a Debug node * Wire the two together * Deploy Click the Deploy button. * Add a Function node write JavaScript code. # InfluxDB # * a time series database * supports high write and query loads * SQL-like query * supports HTTP API ## Install ## [https://www.influxdata.com/get-influxdb/][https_www.influxdata.com_get-influxdb] ## Compare with MySQL ## <table> <thead> <tr> <th>InfluxDB</th> <th>MySQL</th> </tr> </thead> <tbody> <tr> <td>database</td> <td>database</td> </tr> <tr> <td>measurement(auto create)</td> <td>table</td> </tr> <tr> <td>points</td> <td>line</td> </tr> <tr> <td>key</td> <td>field</td> </tr> <tr> <td>value</td> <td>value</td> </tr> </tbody> </table> ## Running ## $ influx -precision rfc3339 Connected to http://localhost:8086 version 1.7.x InfluxDB shell 1.7.x > * create database CREATE DATABASE mydb * show databases SHOW DATABASES * user database before write and read,please use USE <db-name> to select the databse,for example USER mydb * insert data insert measurement, key=value… INSERT cpu,host=serverA,region=us_west value=0.64 * select data select field from measurement SELECT "host", "region", "value" FROM "cpu" ## HTTP API ## status code: 2xx: request success 4xx: send wrong data 5xx: server error -------------------- * create database curl -i -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb" * insert data curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu,host=server01,region=us-west value=0.64 1434055562000000000' * select data curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=mydb" --data-urlencode "q=SELECT \"value\" FROM \"cpu_load_short\" WHERE \"region\"='us-west'" [avatar]: /images/20230601/f215216304e847e09666e7ef16b39f54.png [https_nodejs.org_en]: https://nodejs.org/en/ [http_localhost_1880]: http://localhost:1880 [http_ip-address_1880]: http://%3Cip-address%3E:1880 [https_www.influxdata.com_get-influxdb]: https://www.influxdata.com/get-influxdb/
相关 Go language study essay 2019-10-30 Go language study essay 2019-10-30 1. Conditional statements 1)if if a > 10 阳光穿透心脏的1/2处/ 2023年06月11日 10:30/ 0 赞/ 10 阅读
相关 2019-10-15 Afternoon essay AfterNoon Node Red a programming tool for wiring together hardware devices, API 逃离我推掉我的手/ 2023年06月08日 02:37/ 0 赞/ 7 阅读
相关 20191015 (26) RT-Thread 简述内核移植 目的 1 了解内核移植的简单内容,具体移植内容需要详细看官方文件 -------------------- 正文 1 CPU 架构移植 利用 libcpu ゝ一纸荒年。/ 2023年06月07日 12:25/ 0 赞/ 14 阅读
相关 2017/3/21 afternoon 听老师讲课。 1.引言 外部网关协议BGP称为边界网关协议,为什么外部网关不使用内部网关协议?主要是BGP使用的环境不同。主要因为一下两个原因: 第一、 「爱情、让人受尽委屈。」/ 2021年10月01日 08:02/ 0 赞/ 223 阅读
还没有评论,来说两句吧...