ipr

is-port-reachable

Check if a local or remote port is reachable

Showing:

Popularity

Downloads/wk

201K

GitHub Stars

77

Maintenance

Last Commit

1mo ago

Contributors

4

Package

Dependencies

0

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

is-port-reachable

Check if a local or remote port is reachable

Install

npm install is-port-reachable

Usage

import isPortReachable from 'is-port-reachable';

console.log(await isPortReachable(80, {host: 'google.com'}));
//=> true

API

isPortReachable(options)

Returns Promise<boolean> for whether the port is reachable.

port

Type: number

The port to check.

options

Type: object

host

Required\ Type: string\ Example: 'localhost'

The host to check.

Can be a domain (optionally, with a sub-domain) or an IP address.

timeout

Type: number\ Default: 1000

The time to wait in milliseconds before giving up.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial