Easily add a REPL to your Node.js app.
npm install replify
var replify =app =
replify(options, app, [contexts])
name[String] - Name for the REPL domain socket. Default: replify. You are going to want to assign a value for this. Note: Due to the fact that Node no longer cleans up domain socket files behind itself,
replifyautomatically paves over the existing file when it starts.
path[String] - Default: /tmp/repl. The REPL will be located at
extension[String] - Default: .sock.
logger[Object] - Default: console.
start[Function] - Default: require('repl').start. Useful for custom repls like replpad.
app[Object] - Alternative to using the
contexts[Object] - Alternative to using the
Primary context. Exposed as:
Additional contexts exposed under the name of the key.
Connect to the REPL
$ nc -U /tmp/repl/realtime-101.sock
$ socat READLINE /tmp/repl/realtime-101.sock
Node repl client with history scrollback and tab completion. Learn more about
repl-client (rc). Install with
npm install repl-client -g.
$ rc /tmp/repl/realtime-101.sock
Recommended to use
repl-client. Note that Windows pipes don't live on disk, and the path to the socket is not quite the same as *nix environments.
$ rc \\.\pipe\tmp-repl\realtime-101.sock
(The MIT License)
Copyright (c) 2012-2014 Daniel D. Shaw, http://dshaw.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.