# pigato-proxy

> A pigato proxy to forward a request from a broker to another

Latest version **0.0.1** (published 2015-07-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install pigato-proxy
pnpm add pigato-proxy
yarn add pigato-proxy
bun add pigato-proxy
```

Provides the command `pigato-proxy`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2015-07-21 |
| First published | 2015-07-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Maxence Dalmais |
| Maintainers | maxired |

## Links

- npm: https://www.npmjs.com/package/pigato-proxy
- Repository: https://github.com/maxired/pigato-proxy
- Homepage: https://github.com/maxired/pigato-proxy#readme
- Issues: https://github.com/maxired/pigato-proxy/issues
- npm.io page: https://npm.io/package/pigato-proxy

## Dependencies (4)

- [async](https://npm.io/package/async.md) ^1.3.0
- [debug](https://npm.io/package/debug.md) ^2.2.0
- [pigato](https://npm.io/package/pigato.md) 0.0.39
- [commander](https://npm.io/package/commander.md) ^2.8.1

## Recent versions

- 0.0.1 (latest) — 2015-07-21

## README

# pigato-proxy
A pigato proxy to foward a request from a broker to another

This can be used as a module or as a standalone binary

#Standalone Binary

##Installation
```npm i -g pigato-proxy```

##Usage
```
  Usage: pigato-proxy [options]

  Options:

    -h, --help                           output usage information
    -V, --version                        output the version number
    -s, --source [endpoint]              Source Endpoint
    -ss, --sourceservice [service]       Source Service
    -d, --destination [endpoint]         Destination Endpoint
    -ds, --destinationservice [service]  Destination Service [sourceservice]
```

#Node.JS module

```
var PigatoProxy = require('pigato-proxy');

var endpoint = 'tcp://127.0.0.1:55000';

var proxy = new PigatoProxy( endpoint , { proxy : { remote : tcp://127.0.0.1:55001 , service : '/foo'});
proxy.start(function(){ console.log('started')});
```

###Autostart
If we give a callback to the constructor, then the proxy will be automatically started

```
PigatoProxy( endpoint , { proxy : { remote : tcp://127.0.0.1:55001 , service : '/foo'}, function(){ console.log('started')});
```

###Service Forward
Moreover, we can also change the name of the service requested.
This can be usefull to dynamically linked two services even if servicename are hard coded

```
PigatoProxy( endpoint , { proxy : { remote : tcp://127.0.0.1:55001 , service : { in :'/foo' , out : '/bar' }, function(){ console.log('started')});

```

---
_Source: https://npm.io/package/pigato-proxy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
