🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

child_process-remote

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

child_process-remote

child_process spawn over TCP

2.0.1
latest
Source
npm
Version published
Weekly downloads
12
100%
Maintainers
3
Weekly downloads
 
Created
Source

Build Status Coverage Status Version License Code style

Motivation

Execute a process through a remote endoint

API

const net = require('net');
const Server = require('child_process-remote/server');

var server = net.createServer(Server);
server.listen(8080, function() {
  console.log("Server is now ready");
});
//assume server is running 
const net   = require('net');
const spawn = require('child_process-remote/spawn')(net.connect(8080));

var version = '';
var child = spawn('node', ['-v']);
child.stdout.on('data', function(line) {
  version = line;
})

child.on('close', function(exit) {
  console.log('All done, version is %s , exit code is %d', version, exit);
});

Credits

  • 131

Keywords

child_process

FAQs

Package last updated on 14 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts