Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

net-repl

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

net-repl

REPL over the network with autocomplete and color support. Both Server and Client

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
26
increased by8.33%
Maintainers
1
Weekly downloads
 
Created
Source

node-net-repl

node.js REPL server/client over sockets that support autocomplete and colors.

Build Status

Installation

npm install net-repl

Quick Example

Creating a server

var repl = require('net-repl');
var srv = repl.createServer(opts).listen('repl.sock');

Adding shortcut for connecting to repl on your application

opts accepts all the options that are accepted by repl.start

Add the following to your package.json

"scripts": {
	"test": "jasmine-node spec",
	"repl": "./node_modules/.bin/repl-client repl.sock"
}

To connect run

$ npm run repl

The Server

var repl = require('net-repl');

var options = {
	prompt: 'foo> ', //optional set a custom prompt
	deleteSocketOnStart: false //if you use UNIX socket and the application exits without running stop() the unix socket file will remain, this deletes the old socket file when you start the server.
}

var portOrPath = '/tmp/repl.sock';

//listen method
//@param  {String|Number} listen port number or path to UNIX socket.
//@param {String} [host] if omitted, the server will accept connections directed to any IPv4 address if you supplied a port number.
var srv = repl.createServer(options).listen(portOrPath);

The Client

Usage: repl-client <port|domain socket path> <address if port specified>

Examples:

Unix domain socket
$ repl /tmp/repl.sock

Localhost on port
$ repl 1337

Specified host and port
$ repl 1337 localhost

Run Tests

npm install

Keywords

FAQs

Package last updated on 19 Sep 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc