Updating node-red settings.js and restarting node-red.

Home Forums Conduit: AEP Model Updating node-red settings.js and restarting node-red.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #17952
    Ajay K
    Participant

    I am trying to add a custom object to the node-red setings.js file, in the globalfunctioncontext area of the settings.js file. Here are a few questions related to that and was hoping to get some guidance related to it.

    1) I am assuming the settings.js file under the \var\config\app\install\development\settings.js file is the one I am supposed to update?

    2) If the location of the setting.js file mentioned above is the right one, I am assuming this is protected from firmware upgrades?

    3) When I make changes to the settings.js file, do I need to restart the node-red application or is there a file watcher setup by node-red application that would cause the node-red to restart on its own? If not what is the best way to restart node-red?

    Thanks,
    Ajay

    #17953
    Ajay K
    Participant

    Any thoughts on this or if this has been addressed in the forum, can you please point me to this forum thread.

    Thanks,
    Ajay

    #17957
    Jeff Hatch
    Keymaster

    1) I am assuming the settings.js file under the \var\config\app\install\development\settings.js file is the one I am supposed to update?

    If you have not installed an app from DeviceHQ, that is correct.

    2) If the location of the setting.js file mentioned above is the right one, I am assuming this is protected from firmware upgrades?

    This file is not overwritten by upgrades. The only field that gets overwritten is the listen port for Node-RED.

    3) When I make changes to the settings.js file, do I need to restart the node-red application or is there a file watcher setup by node-red application that would cause the node-red to restart on its own? If not what is the best way to restart node-red?

    You should restart Node-RED. There is an init script “/etc/init.d/node-red” you can use to restart it: /etc/init.d/node-red restart

    Jeff

    #17977
    Ajay K
    Participant

    Thanks Jeff for taking the time to respond. With respect to question no.3, you mentioned I could use “/etc/init.d/node-red restart”. Do I need to run it from the SSH prompt? I am a little lost when it comes to Linux based OS.

    Is this something that can be made available to run from the Admin screen as a feature, to restart node-red, that way if it needs to be done remotely as well, it can be done, without SSHing into the box or the equivalent to run the script?

    Thanks,
    Ajay.

    #17983
    Jeff Hatch
    Keymaster

    Ajay,

    You can use the command at the SSH prompt or you can go into the Web UI, got to the Apps page, disable Node-RED and then re-enable it.

    Jeff

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.