Skip to content

angy91m/is-ready-tcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-ready-tcp

is-ready-tcp allows you to easy await and check any tcp service connection

Installation

npm i is-ready-tcp

Usage

const isReadyTcp = require( 'is-ready-tcp' );
( async () => {
    try {
        await isReadyTcp( 3000 );

        // Success
        // You can connect to your service

    } catch ( error ) {
        // Connection timeout reached
    }
} )();

Parameters

isReadyTcp( port: Integer [, host: String = 'localhost' [, timeOutSeconds: Number = 30 [, intervalAttemptsSeconds: Number = 1 ]]] )

About

A module that allows you to easy await and check any tcp service connection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published