Socket
Book a DemoInstallSign in
Socket

get-server-port

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-server-port

Get the port from a server

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

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

Keywords

server

FAQs

Package last updated on 17 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts