Storing an index by a counter

#1

hello, I will need help,
the goal of the program is to store a counter index to prevent each node red start or redeploy, indexe starts to zero.
I tried several solutions without success

the storage keeps the value of the idex in memory and changes it into a topic.
if the starting index is1 (initialization) then take the Topic.
But it does not work.


this is what happens after a redeployment

0 Likes

#2

Might I suggest yu read the documentation about context - It may give you some ideas
https://nodered.org/docs/user-guide/context and this thread might help

0 Likes