0.1.4 • Published 5 years ago

@lawcket/publisher v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

@lawcket/publisher

Downloads Version License

Middleware for @lawcket/websocket injects publish method.

Installation

yarn add @lawcket/publisher

or

npm install @lawcket/publisher

Manual client building

In normal use-cases you shouldn't need to manually build the client. @lawcket/websockets already creates a publish function once the client is connected. However, in case you want to reconstruct publish communications, the following example illustrates how to.

Example:

// non-ES6
// const { builder } = require('@lawcket/publisher');

// ES6
import { builder } from '@lawcket/publisher';

// create the communication client
const client = builder({ 
    stage: 'test',
    domainName: 'test.execute-api.us-west-2.amazonaws.com',
    connectionId: 'testId',
});

// send a message 
client({ foo: 'bar' }).then((res) => console.log('yay', res));
0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago