🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

node-proxy-latency-tester

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-proxy-latency-tester

Node proxy for simulating webserver latencies on localhost or testing enviroments (CI)

1.0.0
latest
Source
npm
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

Node Poxy Latency Tester

This command line tool helps you to create a proxy that adds adds a latency between two services. This is useful for testing purposes and simulations.

Installation

via npm:

npm install node-proxy-latency-tester

Usage

$ node-proxy-latency-tester -h

Usage:
  node-proxy-latency-tester [OPTIONS] [ARGS]

Options:
  -t, --target [NUMBER]  target port (service port) (Default is 8080)
  -f, --forward [NUMBER] forward port (new port through proxy) (Default is 7070)
  -l, --latency [NUMBER] latency in ms (Default is 0)
  -h, --help             Display help and usage details

Let's say that you have a service running on localhost:8080 and you can add a latency of 300 ms without changing the service. You can easily accomplish this with:

np -t 8080 -f 8081 -l 300

Now you can use your service on port 8081 with a latency of 300 ms. You can also use np for short.

Keywords

cli

FAQs

Package last updated on 21 Mar 2017

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