This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

ws-testbed-cli

0.1.0 • Public • Published

NPM version Build Status Coveralls Status Dependency Status

ws-testbed-cli provides a command line interface for ws-testbed, running on Node.js.

Installation

npm install -g ws-testbed-cli

This will install the CLI globally and provides the script ws-testbed.

Running

When installed, run the command ws-testbed on the console. Without parameters, it will print the usage information and exit:

Usage:
  ws-testbed connect <url>... [options]
  ws-testbed serve <port>... [options]
  ws-testbed load [<cfgfile>] [options]
  ws-testbed -h | --help
  ws-testbed --version

Commands

"connect" command

Create outgoing connection(s) to the given URL(s).

"serve" command

Create server(s) on the given port(s).

"load" command

This command optionally loads a previously saved config file. Together with the --savecfg option this allows a setup to be restored without providing the complete command line again.

This is also the only way to restore a state if a plugin modified control values during runtime.

Options

--savecfg=CFGFILE

This will store all control values of all plugins in the given configuration file. This file can then be used later with the "load" command.

--plugins=PLUGINS

PLUGINS is a comma separated list of plugins to load. A plugin is specified with a type, a colon (':') and some parameter for the type. Example: --plugins=file:TestPlugin.js,file:OtherPlugin.js

The connect/serve commands do not provide much functionality without plugins. The power of the testbed comes with plugins, which need to be specified.

Supported Plugin Types

file

The file type will load the given file (using require()) and expects this file to export a constructor function for an object that implements the PluginExports interface from ws-testbed.

Examples

See ws-testbed-chat for a simple plugin.

License

The project is available under the terms of the New BSD License (see LICENSE file).

Readme

Keywords

none

Package Sidebar

Install

npm i ws-testbed-cli

Weekly Downloads

1

Version

0.1.0

License

none

Last publish

Collaborators

  • dertseha