@mixint/pathfork

A Transflect stream that executes a program and returns an object containing arrays of stdin, stdout, stderr


Keywords
fork, child_process, spawn, stdin, stdout, stderr, transflect
License
FSFULLR
Install
npm install @mixint/pathfork@2.0.1

Documentation

PathFork

PathFork is a Transflect stream released with MIXINT v0.1.0. It executes the program passed to it from the URL pathname, and passes the &-separated arguments from the querystring. The body of the request is piped to stdin of the program, and stdout/stderr are buffered into arrays. Once the program exits, a response body includes a JSON object with source, error, stdin, stdout, stderr, and exit properties.

example screenshot showing output

Programs that run more than a few seconds may time out. To keep track of long running processes, including tailing the stdout / stderr of ongoing processes, an improvement called TeleFork is planned.