Listening on a specific interface

14 views
Skip to first unread message

Kamal Kumar Panta

unread,
Aug 3, 2016, 6:29:56 AM8/3/16
to Express
I have a requirement where my application should listen only on the management interface. And the management interface ip could be changed from my application.
How to specify so that it always listens only on the management interface though the ip could change.

Jishnu Viswanath

unread,
Aug 3, 2016, 11:53:02 AM8/3/16
to expre...@googlegroups.com
If you can trigger a request when IP changes you can listen to that request and make the necessary changes.

Jishnu Viswanath
Software Engineer
Scienaptic Systems

On Wed, Aug 3, 2016 at 8:29 PM, Kamal Kumar Panta <sash...@gmail.com> wrote:
I have a requirement where my application should listen only on the management interface. And the management interface ip could be changed from my application.
How to specify so that it always listens only on the management interface though the ip could change.

--
You received this message because you are subscribed to the Google Groups "Express" group.
To unsubscribe from this group and stop receiving emails from it, send an email to express-js+...@googlegroups.com.
To post to this group, send email to expre...@googlegroups.com.
Visit this group at https://groups.google.com/group/express-js.
For more options, visit https://groups.google.com/d/optout.

Paul Vencill

unread,
Aug 4, 2016, 1:48:22 AM8/4/16
to expre...@googlegroups.com
Not sure where the requirement comes from, but I feel this is inherently a bad / fragile design to have the application itself care about it. 

Much better to make that a configuration concern, and let the sysadmins ensure it's set correctly.  I generally use the Convict module for this sort of thing, but basically you have the application pull the IP it should listen on via the convict config file or an environment variable or whatever.  
Reply all
Reply to author
Forward
0 new messages