eo-client-proxy

1.0.0 • Public • Published

eo-client-proxy

This module provides simple HTTP proxy logic and is intended to be run on localhost when implementing custom clients. The proxy will be started at http://127.0.0.1:4300 and forwards all client requests to the user-specified gateway.

Installing globally

Install with npm:

$ npm install -g eo-client-proxy

This will install the proxy component globally so that it may be run from the command line.

Usage

$ eo-client-proxy [options]

or use the shortcut name:

$ eopx [options]

Available options:

-t or --target Target gateway address to use (defaults to http://127.0.0.1)

-l or --level Console logging level (defaults to info), possible values are:

    silent: no logging at all

    error: logs errors only

    info: logs most common data: request/response URL, request method, status code

    fine: enhances the info level by HTTP headers

    all: logs everything

-h or --help Prints this list end exit.

Example

Forwarding client calls to the specific gateway which is running on http://<gateway_host>:<gateway_port>:

$ eopx -t http://<gateway_host>:<gateway_port>

Forwarding client calls to the local gateway without logging:

$ eopx -l silent

Package Sidebar

Install

npm i eo-client-proxy

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

9.57 kB

Total Files

6

Last publish

Collaborators

  • eo-sdk
  • optimal-systems-npm