Socket
Socket
Sign inDemoInstall

find-port

Package Overview
Dependencies
1
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-port

find an unused port in your localhost


Version published
Maintainers
2
Weekly downloads
3,957
increased by11.03%
Bundle size
8 kB
Minified + gzipped

Weekly downloads

Readme

Source

find-port

find an unused port in your localhost

	var findPort = require('find-port')

	// scan a range
	findPort('127.0.0.1', 8000, 8003, function(ports) {
		console.log(ports)
	})

	// scan explicitly
	findPort('127.0.0.1', [8000, 8011], function(ports) {
		console.log(ports)
	})
  • Since version 2.0.0 a local interface must be specified
  • This module is not designed to scan remote ports only local ones.

Keywords

FAQs

Last updated on 13 May 2022

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc