Skip to content

Unitech/spiderlink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple, yet optimized application intercommunication within the same machine. Based on WS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published