Skip to content

test if the connection can be established with the given host and port

License

Notifications You must be signed in to change notification settings

edelciomolina/node-connection-tester

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

connection-tester

Build Status

Test to check if the connection can be established or host/port reachable for a given host and port. Useful for testing all the connection in your node application at server startup.

How to Use

Async version

var connectionTester = require('connection-tester');

connectionTester.test('www.yahoo.com', 80, function (err, output) {
    console.log(output);
});
connectionTester.test('api.paypal.com', 443, function (err, output) {
    console.log(output);
});

Sync version

var connectionTester = require('connection-tester');

console.log(connectionTester.test('www.yahoo.com', 80));
console.log(connectionTester.test('api.paypal.com', 443));

About

test if the connection can be established with the given host and port

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.0%
  • Makefile 3.0%