/composite-client

Client companion to Composite framework

Primary LanguageJavaScriptBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

composite-client

Client-side library for connecting to Composite backend service

Installing

Download or clone the /build/min/composite.min.js into your site. It’s possible to use RequireJS or Browserify as well (see below). Include the file like any other script <script src=”{directory}/composite.min.js”></script>.

Using

The composite file exposes a Composite constructor that you’ll use to connect, send messages, and listen for events on. A simple example would be:

// Instantiate the library, connect, and listen for a response
var composite = new Composite();
composite.on(‘init’, function(response) {
    console.log(response);
});

composite.connect(‘http://yourUrlHere/composite’);

Documentation

For complete documentation, view: