Simple REPL for embedding into applications
Add a REPL into your application.
npm install replize
replize is most useful when attached onto instances (however, it can be used in any way you like).
It exports a constructor that takes a configuration hash:
portnumber (required) Port to listen on. This is how you connect to it
localhost) Interface to bind to
contextobject To expose something for REPL you attach it to this object. Key name will become the object name you call in the REPL (see example below).
bin folder contains a REPL client you can use:
var Repl = require'replize'thisrepl = Replport: 20000context:'foo': thisconsole.log'foo'
Connect to this instance:
$ ./bin/repl 20000
and you will see
foo instance print
foo into console.
See example folder.