Skip to content

Matt-Esch/replr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

replr

REPL remote access for Node apps/services with cluster and worker selection support.

Features

  • Remote access over replr client with HTTP upgrade, netcat or telnet on a TCP port
  • Use as console to spin up a rails console clone for your stack in minutes
  • Use cmds() to list all exported methods and corresponding documentation
  • Use vars() to list all exported vars
  • Use workers() to describe all workers of a cluster node app
  • Use select(workerId) to switch REPL context to a worker
  • Supports REPL over unix domain socket by specifying port as a file path

How add replr?

replr.create({
    name: 'MyApp console',
    prompt: 'myApp> ',
    port: 2323,
    useColors: true,
    useGlobal: true,
    ignoreUndefined: true,
    exports: function replrExports() {
        return {
            increment: function increment() {
                return statefulThing.counter++;
            },
            getStatefulThing: function getStatefulThing() {
                return statefulThing;
            }
        };
    }
});

For an example of using replr as a console see the examples/console.js example.

Installation

npm install replr

Tests

npm test

MIT Licensed

About

REPL remote access for Node apps/services with cluster and worker selection support.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CoffeeScript 90.9%
  • JavaScript 9.1%