Skip to content

octoblu/node-meshblu-websocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

meshblu-websocket

Pure websocket implementation of the Meshblu client

Build Status npm version Gitter

Install

npm install meshblu-websocket

Example

var MeshbluWebsocket = require('meshblu-websocket');
var MeshbluConfig = require('meshblu-config');

var meshbluConfig = new MeshbluConfig().toJSON();
var meshblu = new MeshbluWebsocket(meshbluConfig);

meshblu.connect(function(error){
  if (error) {
    console.error(error.message);
  }

  meshblu.subscribe({uuid: meshbluConfig.uuid});

  meshblu.on('config', function(data){
    console.log('config', data);
  });

  meshblu.updateDangerously({
    uuid: meshbluConfig.uuid,
    token: meshbluConfig.token
  }, {
    '$push': {
      stuff: {
        foo: 'bar'
      }
    }
  });
});

About

Pure websocket implementation of the Meshblu client

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors