node package manager
Loosely couple your services. Use Orgs to version and reuse your code. Create a free org »

metemq-thing-js

MeteMQ Thing JS

MeteMQ Thing library for Node.js

Getting Started

Install MeteMQ Thing JS package

npm i --save metemq-thing-js
var Thing = require('metemq-thing-js').Thing;
var thing = new Thing('MY_FIRST_METEMQ_THING_JS');
 
var sub = thing.subscribe('demo')
 
sub.on({
    added(name, age) {
        console.log(`${name}(${age})`);
    }
});
 
thing.call('hello', function(result) {
    console.log(`hello ${result}!`);
});
 
const temp = thing.bind('temp');
 
setInterval(function() {
    temp.set(Math.random());
}, 2000);
 
thing.actions({
  print(c, ...args){
    console.log(`message from server: ${args}`);
    c.done();
  }
})

How to test?

npm test

Or, in order to watch

gulp watch