Change location of Projects folder

I have started working with Node-RED Projects recently and I like that feature very much. The one thing that bothers me however is the default location of those projects. Once you enable projects, they automatically get stored in %userprofile%/.node-red/projects and it is not possible to change that location other than by changing the Node-RED's userDir parameter, which means moving the entire NR hierarchy.

My use case is that I use NR to create customized flows for customers that want to connect to another application of mine. That other application has a number of resource files that vary from project to project and my NR flows need access to those files.

Now I could store those files outside of a NR project (say, in C:/MyResources) but then I wouldn't be able to package them automatically with my project before sending it to a customer. And I wouldn't have the versioning functionality that NR's Project feature enables through the GitHub integration.

I could also store those resource files inside the project, which would allow me to package and version my project, but then I would have to change my other application so that it stores its resources in the NR folder structure, which obviously changes from user to user (not to mention the fact that the user might have changed their userDir settings for NR).

So my suggestion would be to add a setting in the projects property of the settings.js file:

    projects: {
        enabled: true,
        projectDir: "C:/MyResources"
    }

When the projectDir property is set, it would direct NR to base its Projects hierarchy on that folder instead of the default location, yet the rest of the NR's functionality would remain unchanged.

This would allow NR designers to store all their projects in an arbitrary location, including your local instance of OneDrive or DropBox. Our company's IT department has issued guidelines that any business-related files we create/modify must be stored on OneDrive so that they don't have to backup each individual laptop in the entire organization.

Thanks,

7 Likes

I believe that this might be on the backlog.

However, as a possible workaround, perhaps consider using soft links. Slightly awkward in this case as you have to create the project first and then (re)move the folder and replace it with a link to a folder wherever you want it to be.

I will definitely try that, sounds like a reasonable workaround until the feature is supported. I will report my success (or failure) here, in case anyone else is looking for the same thing.

Thanks for the suggestion!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.