New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

connection-test-table

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connection-test-table

connection test table module

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

connection-test-table

Test dependent service host/port to check if the connection can be established and print the result in tabular structure.

While development usually we depend on in-house or public STAGE/QA/SANDBOX services and it's very common to find these services flaky. To find if your node app is not working as expected because of bad host/server down/server unreachable, you can use this module at server startup.

How to Use

    var connectionTester = require('connection-test-table');

    var config = {};
    var jsonData = {};
    connectionTester.test(config, jsonData, [callback]);

Config

  • title: Title of the table. [optional]
  • showcolors: show results in colors. default true [optional]
  • showOnlyErrors: show only error results. default false [optional]

    var config = {
        title: 'My awesome title',
        showcolors: true,
        showOnlyErrors: false
    };

Data format

Data should to be a JSON with service information. Service information can be any level deep as long as it contains host/port schema.


{
    "paypal": {
        "protocol": "https:",
        "host": "api.paypal.com",
        "port": 443
    },
    "google": {
        "maps": {
            "protocol": "https:",
            "host": "maps.googleapis.com"
        },
        "translate": {
            "protocol": "https:",
            "host": "www.googleapis.com"
        }
    }
}

For more examples, check test fixtures.

Screenshots

Success case while connecting to public APIs

Error case while connecting to unreachable Stages

Keywords

FAQs

Package last updated on 30 Jun 2016

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc