kalm-snappy

3.0.0 • Public • Published

kalm-snappy

Snappy serializer for Kalm

kalm-snappy Node Build Status Dependencies Status

Install

npm install kalm-snappy

Usage

Setting up your server:

    const Kalm = require('kalm');
    const snappy = require('kalm-snappy');
    
    const server = Kalm.listen({
        port: 3000,
        serial: snappy
    });
 
    server.on('connection', (client) => {
        client.subscribe('/', (data) => {
            console.log(data);  // 'Hello from Browser!'
        });
    });
    

Using in your browser:

    // Install kalm and kalm-snappy via a package manager (recommended).
         
    import Kalm from 'kalm';
    import snappy from 'kalm-snappy';
    
    const client = Kalm.connect({
        hostname: '127.0.0.1',  // Your server's hostname
        port: 3000,             // Your server's port
        serial: snappy
    });
 
    client.write('Hello from Browser');
    

Testing

npm test

Contribute

Please do! This is an open source project - if you see something that you want, open an issue or file a pull request.

If you have a major change, it would be better to open an issue first so that we can talk about it.

I am always looking for more maintainers, as well. Get involved.

License

Apache 2.0 (c) 2017 Frederic Charette

Package Sidebar

Install

npm i kalm-snappy

Weekly Downloads

1

Version

3.0.0

License

Apache-2.0

Last publish

Collaborators

  • fed135