Run a flow without running the GUI editor or opening a port

#1

Hey I am trying to run a flow without having the GUI open or have a port open, essentially what I want is to be able to run node-red myflow.json and have the results of the flow output to the terminal. I would like this to happen without the web service spinning up.

is this possible?

Thanks

0 Likes

#2

If you mean you’d like node-red to start, run your flow, then exit - no, that isn’t possible. Node-RED doesn’t know when any particular flow has ‘finished’ - it is intended to run as a long-running process.

You can disabled the http routes by setting httpAdminRoot and httpNodeRoot to false - https://github.com/node-red/node-red/blob/master/settings.js#L89, but it’ll still start the http server…

1 Like

#3

Presumably you could use an exec node to run a command to stop node-red when the flow completed.

0 Likes