--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/b83322a7-26df-4647-b0da-3764e0b7d16f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
That is now the fourth time you've posted the same question here and on stack Overflow at the same time.
http://stackoverflow.com/questions/42934063/how-could-i-get-the-host-and-protocol-in-node-red
Hi,Via your settings file, you'll see RED.settings.uiPort and RED.settings.uiHost are used to set what port and interface node-red listens on. However that won't necessarily tell you what external IP address is used to access the instance; the default value of 0.0.0.0 means it listens on all interfaces.So you would have to add a custom setting to the settings object in settings.js to hold that information.Nick
On 21 March 2017 at 17:15, Kulasangar Gowrisangar <kulasa...@gmail.com> wrote:
Is it possible to get the host url and the protocol from the server side (ie: any node js file) ?For example, let's say the node-red is running on http://localhost:1880, I need to get the protocol (http) and the host(localhost:1880).I was able to get it from the client side by using window.location.host and window.location.protocol, but then not sure how could I get it in my js?Thanks!
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
And if you continue to cross post the same question to both here and Stack Overflow, please at least include a link to the SO post here so you don't duplicate efforts in trying to help you.
So you would have to add a custom setting to the settings object in settings.js to hold that information.
module.exports = function(RED){}