Should node-RED pick up a .json flows file dropped into lib/flows?

23 views
Skip to first unread message

mfeb

unread,
Jul 2, 2015, 1:36:45 PM7/2/15
to node...@googlegroups.com
Does node-RED keep its own index of exported flows files?

I have one that's been developed by another group and I'd like to just drop the file into lib/flows and have node-RED discover it.

Also, I think I've seen some inconsistency about exporting using the .json suffix and not. Is it the case that the .json suffix be entered when specifying the export name? If you don't is it always appended?

Nicholas O'Leary

unread,
Jul 2, 2015, 3:02:39 PM7/2/15
to Node-RED Mailing LIst
You should be able to drop the file under lib/flows and then it will show up after node-red is restarted. The assumption has always been the only files written there are put there by the editor, so the runtime knows to update its in-memory list of files. It would be fairly simple for us to add a watch on the directory to spot updates without having to restart.

As for the filename - I think in earlier versions it would append .json if you didn't specify it. That got removed a couple releases ago as a side effect of a tidy up of the storage api - not sure that was entirely intentional. Need to review it properly (along with the other library functions for Function/Template nodes etc) and make sure its doing the Right Thing.

The whole UX of saving to (and retrieving from) the library needs some work - it hasn't been touched since the very early days.

Nick

--
http://nodered.org
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages