I just started learning node-red recently.
I want to modify the parameters in the Flows file in the background while the Node-RED is running, and when the page of browser is refreshed I can see the update on the workbench.
Please tell me what should I edit my codes !
To get it to re read the flows file you will need it to restart node red.
Please explain why you need to change the file, it may be that there is a better way of solving your problem.
Thanks for your Reply！
I want to store the flows files of different users. When someone uses it, I can read his json file from the database and display the flow he made. And node red is running all time.
If this doesn't work, I will try to modify logic of it.
You could use the runtime api to post a flow to node-red.
The Node-RED runtime only runs one set of flows at a time.
For the scenario you describe, the runtime will be running User A's flows, then User B will login and the runtime will stop User A's flows and start User B's flows. That probably isn't what you want to happen.
Are the individual users logging on to the computer before going to the page? If so then you could include code in the logon scripts (how you do this will depend on the OS you are running) that stops node red and re-starts it pointing to that users flows file. Alternatively you could have multiple versions of node-red running at the same time, one running each user's flows, with different port numbers for each user.
I have understood, I will try to use different ports for each user. Thanks!
This suggestion sounds good, I will try to use it. Thanks again!
I have not learned this aspect yet and I will try to read sth about it .Thanks!