spawnpassthru

1.2.1 • Public • Published

spawnPassthru

nodejs ChildProcess.spawn with stdio:inherit.

Installation

npm i spawnpassthru

or as a development-only dependency:

npm i spawnpassthru --save-dev

Usage

Same as the standard NodeJS options for ChildProcess.spawn().

All params are optional except for the exe path.

const spawnPassthru = require("spawnpassthru");


const childProcess = await spawnPassthru("telnet towel.blinkenlights.nl");


const childProcess2 = await spawnPassthru(
	/*exe path*/ "/path/to/exe/chrome", 
	
	/*params*/ [
		"--headless", 
		"--disable-gpu", 
		"--remote-debugging-port=9222", 
		// "--ignore-certificate-errors", 
		// "--ignore-urlfetcher-cert-requests", 
		"--allow-insecure-localhost", 
		"--enable-logging", 
		"--v=1", 
		"https://127.0.0.1:8111/index.html"
	],

	/*ChildProcess options*/ {}, 

	/*seconds until SIGINT terminate process; 0 to disable.*/ 0, 

	/*string to send to stdin*/ "",
	/*seconds to wait before sending string to stdin*/ 5
);

// console.log(childProcess.pid);
// childProcess.kill("SIGINT");

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i spawnpassthru

      Weekly Downloads

      2

      Version

      1.2.1

      License

      MIT

      Unpacked Size

      5.8 kB

      Total Files

      4

      Last publish

      Collaborators

      • oxygens