Skip to content

Instantly share code, notes, and snippets.

@lgfa29
Created April 18, 2016 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgfa29/d98a71f514b2b5cb8bd04333eaa59b1a to your computer and use it in GitHub Desktop.
Save lgfa29/d98a71f514b2b5cb8bd04333eaa59b1a to your computer and use it in GitHub Desktop.
[
{
"id": "74b54544.7661ec",
"type": "switch",
"z": "a482186c.51edb8",
"name": "",
"property": "database",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "database1",
"vt": "str"
},
{
"t": "eq",
"v": "database2",
"vt": "str"
}
],
"checkall": "true",
"outputs": 2,
"x": 377.5,
"y": 133,
"wires": [
[
"a374a7ad.c4b928"
],
[
"108e9990.c828a6"
]
]
},
{
"id": "5484c8c.8cd5838",
"type": "inject",
"z": "a482186c.51edb8",
"name": "",
"topic": "",
"payload": "database2",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"x": 96.5,
"y": 133,
"wires": [
[
"ca404ca7.27578"
]
]
},
{
"id": "ca404ca7.27578",
"type": "function",
"z": "a482186c.51edb8",
"name": "",
"func": "msg = {\n database: msg.payload,\n payload: 'abc'\n};\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 238.5,
"y": 133,
"wires": [
[
"74b54544.7661ec"
]
]
},
{
"id": "a374a7ad.c4b928",
"type": "cloudant out",
"z": "a482186c.51edb8",
"name": "",
"cloudant": "",
"database": "database1",
"service": "node-red-cloudant-test-luiz-cloudantNoSQLDB",
"payonly": true,
"operation": "insert",
"x": 543.5,
"y": 107,
"wires": []
},
{
"id": "108e9990.c828a6",
"type": "cloudant out",
"z": "a482186c.51edb8",
"name": "",
"cloudant": "",
"database": "database2",
"service": "node-red-cloudant-test-luiz-cloudantNoSQLDB",
"payonly": true,
"operation": "insert",
"x": 544.5,
"y": 162,
"wires": []
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment