port-numbers
Get the information on network port numbers, based on IANA's public listing
Installation
$ npm install --save port-numbers
Example
var pn = require("port-numbers");
pn.getService(80);
pn.getService(3306);
pn.getPort("ntp", "udp");
pn.getPort("postgresql");
API
.getService(port, [protocol])
port
number : the port to lookup. Required.protocol
string : the protocol. Default: tcp
.
.getPort(service, [protocol])
service
string : the service to lookup. Required.protocol
string : the protocol. Default: tcp
.
© 2015 silverwind, distributed under BSD licence