2.0.4 • Published 6 years ago

spiderlink v2.0.4

Weekly downloads
17
License
Apache-2.0
Repository
github
Last release
6 years ago

Spiderlink

Based on WS (UWS compatible)

Install module:

$ npm install pm2 -g
$ pm2 install spiderlink

Then expose some function in app1:

var app = require('spiderlink')('namespace');

app.expose('myfunction', function(data, done) {
  // some processing
  return done({ success : true, my : data });
});

On app2 call remote function:

var app = require('spiderlink')('namespace');

app.call('myfunction', { some : 'data'}, function(data) {
   // data = result
});

PUB/SUB

$ npm install spiderlink
var app = require('spiderlink')('namespace');

app.subscribe('channel1', (message) => {
  console.log('message:', message)
})

app.publish('channel1', { some : 'data' });

Front-end

Use dist/spiderlink.min.js and use it via window.Spiderlink

License

Apache 2

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago