1.0.0 • Published 6 years ago

eo-client-proxy v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

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