Node-red app deployment to live server

Hi, Can anyone help me out?

Which is the file in a node-red application that needs to be deployed to the server
after I run the command grunt build/npm run build

How to deploy node-red application to the live server ?

A Node-RED "application" really means a flow running on THE Node-RED application.

A Node-RED deployment contains the Node-RED application (an npm package) and the contents of the userDir folder (typically ~/.node-red).

So all of that must be available on a production deployment.

The build of Node-RED itself is a process of creating the npm package and is only needed if you are helping to develop Node-RED itself.

@TotallyInformation Thank you. But which folder or file should I upload to the prod server

In brief,
As in angular application, we write a command "ng build", It creates a dist folder, and hence dist folder is deployed to the server

Similarly, for node-red what is the command and which folder needs to be given to the server

Node-RED is an application platform. It is already built and must be installed on the production platform.

The userDir folder contains everything else. All of it must be present on the production server. However you may not need to upload the whole folder every time as not everything may change. The flows and creds files will change most often for many deployments. However, in some cases, other files and folders may also change during development.

The userDir folder also contains the addin contributed nodes which are installed as npm packages. You may wish to manage these on the server independently.

You need to understand something about Node.js (on which framework Node-RED is built) and about npm in order to manage a production deployment.

In production, the Node-RED application (which is a server) should be run under its own user id (assuming a UNIX-like platform) so that it is protected. You will likely want to manually define where the userDir lives. The name "userDir" is something of a misnomer.

This config is because it was originally a single-user system.

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