get-server-port

1.0.0 • Public • Published

get-server-port

NPM version build status Test coverage Downloads js-standard-style

Get the port from a server.

Installation

$ npm install get-server-port

Usage

import serverPort from 'get-server-port'
import http from 'http'
 
const server = http.createServer()
server.listen()
 
serverPort(server)
// => 2354

API

serverPort(server)

Get the port from a server instance.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i get-server-port

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • yoshuawuyts