インポートするプログラムは、
.node-red/lib/flows に 置きます。
.node-red/lib/flows/http01.json
[
{
"id": "e0046ab2.11aec",
"type": "http in",
"z": "d3c92838.0aca08",
"name": "",
"url": "/testa",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 100,
"y": 150,
"wires": [
[
"15433e15.724bda"
]
]
},
{
"id": "15433e15.724bda",
"type": "template",
"z": "d3c92838.0aca08",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "Hello!<br />\n本日は晴天なり<br />\n<blockquote>\n Jul/16/2017 PM 14:58<p />\n</blockquote>",
"output": "str",
"x": 250,
"y": 150,
"wires": [
[
"e70a7bef.77fcf"
]
]
},
{
"id": "e70a7bef.77fcf",
"type": "http response",
"z": "d3c92838.0aca08",
"name": "",
"statusCode": "",
"headers": {},
"x": 400,
"y": 150,
"wires": []
}
]
node-red で、
読み込み -> ライブラリ -> http01
で読み込むと、
これを、実行して、ブラウザーで
http://127.0.0.1:1880/testa/ にアクセスします。
プログラムを変更して、イクスポートするには、
編集をして、デプロイする前の状態で、書き出すノードを選び、
書き出し -> ライブラリ とすすみます。
.node-red/lib/flows に *.json という形で書き出されます。