listen-interface

1.1.0 • Public • Published

listen-interface

module to listen on a specific network interface

Installation

npm install --save listen-interface

exemple :

var http = require('http'),
    listen = require('listen-interface');
    
var server = http.createServer(function(req, res) {
 // ...
});

listen(server, { 'port': 8080, 'interface': 'wlan0'})

API :

listen :

  • server : http server or net server
  • config :
    • port : port to listen to
    • interface : network interface to listen to
  • [callback] : optionnal callback function

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    85
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    85
  • 1.0.1
    257

Package Sidebar

Install

npm i listen-interface

Weekly Downloads

342

Version

1.1.0

License

Apache-2.0

Unpacked Size

17.2 kB

Total Files

5

Last publish

Collaborators

  • jcreigno