Новичок в узле Красный. Ищите несколько примеров, используяВременная метка для вывода на страницу html в узле Red
inject/timestamp node
и http in node
для вывода на html через http response
.
Я могу получить выход метку времени в debug node
но http response
узел возвращает
"Нет объекта ответа"
код потока
[
{
"id": "9f006bd1.640c3",
"type": "http response",
"z": "d5fed3fc.0eb49",
"name": "",
"x": 897.2000122070312,
"y": 167.1999969482422,
"wires": [ ]
},
{
"id": "e3c543a2.edb15",
"type": "function",
"z": "d5fed3fc.0eb49",
"name": "setHTTPheader",
"func": "// If sending JSON data the content type is:\n//msg.headers={\"Content-Type\":\"application/json\"}\n\n// For HTML use the content type line below:\nmsg.headers={\"Content-Type\":\"text/html\"}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 530.2000122070312,
"y": 178.1999969482422,
"wires": [ [ "9f006bd1.640c3", "148ad3e4.c6b5bc" ] ]
},
{
"id": "30bfd46d.90b3fc",
"type": "inject",
"z": "d5fed3fc.0eb49",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": true,
"x": 214.1999969482422,
"y": 118.19999694824219,
"wires": [ [ "e3c543a2.edb15" ] ]
},
{
"id": "974e0c4.06af17",
"type": "http in",
"z": "d5fed3fc.0eb49",
"name": "/time",
"url": "/time",
"method": "get",
"swaggerDoc": "",
"x": 199.5,
"y": 175.40000915527344,
"wires": [ [ "e3c543a2.edb15" ] ]
},
{
"id": "148ad3e4.c6b5bc",
"type": "debug",
"z": "d5fed3fc.0eb49",
"name": "",
"active": true,
"console": "false",
"complete": "payload",
"x": 895.5000457763672,
"y": 211.8000030517578,
"wires": [ ]
}
]