Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.
/ congo-proxy Public archive

Congo Proxy enables you to easily create proxies use that use Congo.

Notifications You must be signed in to change notification settings

Soluto/congo-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DEPRECATED

This repository is no longer maintained and has been archived. Feel free to browse the code, but please migrate to other solutions.

Congo Proxy

Congo Proxy enables you to easily create proxies use that use Congo.

The proxy uses the invoker to execute a remote call that will be received by the listener on the other end, then responses are retured by the responder. For more info see: Congo Core Explained

Insallation

npm install congo-proxy --save

Usage

Setup the proxy:

var congoProxy = require('congo-proxy');

var proxy = congoProxy("myService", invoker);
proxy.registerMethod("someMethod");
proxy.registerObservable("someObservable");
var myService = proxy.build();

The invoker object should be and object that implements:

invoke(remoteCall: RemoteCall): Observable<Object>

and is responsible for transporting the remote call over the communication layer. see congo-examples for more info.

Once the proxy is created use it as you would use any Promise (for methods) or Observable (for observables)

myService.someMethod()
    .then(result => console.log(result));

myService.someObservable()
    .doOnNext(result => console.log(result))
    .subscribe();

About

Congo Proxy enables you to easily create proxies use that use Congo.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •