https://github.com/bimedia-fr/listen-interface
module to listen on a specific network interface
https://github.com/bimedia-fr/listen-interface
http interface listen listen-interface
Last synced: 3 months ago
JSON representation
module to listen on a specific network interface
- Host: GitHub
- URL: https://github.com/bimedia-fr/listen-interface
- Owner: bimedia-fr
- License: apache-2.0
- Created: 2016-01-20T09:54:15.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-05-20T11:43:02.000Z (almost 2 years ago)
- Last Synced: 2025-02-28T19:19:30.099Z (about 1 year ago)
- Topics: http, interface, listen, listen-interface
- Language: JavaScript
- Size: 18.6 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# listen-interface
module to listen on a specific network interface
## Installation
```sh
npm install --save listen-interface
```
## exemple :
```js
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