Updating node-red settings.js and restarting node-red.
Home › Forums › Conduit: AEP Model › Updating node-red settings.js and restarting node-red.
Tagged: Conduit Aep, Node-RED, setting.js
- This topic has 4 replies, 2 voices, and was last updated 9 years ago by
Jeff Hatch.
-
AuthorPosts
-
March 21, 2017 at 11:34 am #17952
Ajay K
ParticipantI 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,
AjayMarch 21, 2017 at 8:41 pm #17953Ajay K
ParticipantAny thoughts on this or if this has been addressed in the forum, can you please point me to this forum thread.
Thanks,
AjayMarch 22, 2017 at 8:05 am #17957Jeff Hatch
Keymaster1) 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
March 23, 2017 at 5:13 pm #17977Ajay K
ParticipantThanks 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.March 24, 2017 at 7:24 am #17983Jeff Hatch
KeymasterAjay,
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
-
AuthorPosts
- You must be logged in to reply to this topic.