I followed the steps in the
Running Nodered on Rasp Pi unattended post and everything went great - thanks a lot to everyone posting steps/scripts: you guys are awesome! There is only one thing: node-red got installed under usr/local/lib/node_modules/node-red so the flows are saved in that location. I would like to have the flows in pi's home directory so I thought I could use the userDir option but I can't get it to work (I guess I can redo the installation of node-red and not install it with -g but if userDir would work as I thought it should, there is no need for that).
I tried all kinds of combinations: -userDir /home/pi/flows, -userDir=/home/pi/flows, -userDir /home/pi/flows/, --userDir /home/pi/flows and many others but no matter what I try I get:
[red] Loading flows : /home/pi/flows/
[red] Error loading flows : Error: EISDIR, read
I even created a file flows_raspberrypi.json in that dir and still no success. I am obviously doing something wrong. Do I need to copy more files in that dir, like settings.js or create other subdirs or something else?
I'd appreciate any help I can get. Thank you!