README
net-fn: a Node.js Inter Process Communication library
'Inter-process communication' Allows you to communicate with background processes over the 'net' module. The callback APIs perform all operations asynchronously, without blocking the event loop, then invoke a callback function upon completion or error.
Installing
npm install net-fn
Usage example
var net_fn = require("net-fn");
var bg_module = require("your-background-module");
var port = 8021;
var worker = net_fn.tryToRunServer(bg_module, port, "localhost");
var bgModule = net_fn.connect(bg_module, port, "localhost");
// the background module is ready for use
bgModule.fn(arg, function callback(err, result){
...
});
License
Copyright (c) 2021 Manuel Lõhmus manuel@hauss.ee