Skip to content

Command line Options

Anders Johnson edited this page Aug 26, 2013 · 8 revisions

Queen can be executed through the command line as queen [options] [filepath]. The only thing you cannot configure through the command line is populators, you'll need a Queen config file to define those.

[path] queenConfig.js by default

This can either be a local file path, or a URL. The file can either be a Queen config file, or a Queen script.

// Example
// Starts Queen with configuration defined in queenConfig.js 
// if it exists in the current directory, or defaults otherwise
queen

// Starts Queen with a configuration file that is not named queenConfig.js
queen my-config-file.js

// Starts Queen with default options and executes the my-queen-script.js when Queen is ready
queen my-queen-script.js

If the file is a Queen config file, it will be used to configure this queen instance.

If the file is a Queen server-side script, queen will disable it's remote server and execute the server-side script.

-h [host] (also --host) port 9200 on all hosts by default

The host to bind the remote server to. This is the address queen-remote clients will connect to.

// Example
// Starts queen, listening to port 9283 on host queen.turn.com for 
// remote connections (assumes queen.turn.com points to this machine
queen -h queen.turn.com:9283

-c [host] (also --capture) [Internal IP Address]:80 by default

The address to bind the capture server to. Browsers will navigate to the url + "/capture.html" to connect to Queen.

// Example
// Starts queen, listening to port 4848 on localhost for browsers. This would allow
// browsers to connect to this Queen Server by navigating to http://localhost:4848
queen -c localhost:4848

-r [host] (also --remote) Disabled by default

Allows you to connect to a another Queen server to execute code. Setting this option disables the -h and -c commands, since one Queen instance can't act both as a client and a server at the same time.

If the machine you're using this command on doesn't need to start it's own Queen Server, use queen-remote instead, it does the same thing for a fraction of the package size (250 KB instead of 18 MB).

// Example
// Connects to a Queen server running on queen.turn.com, port 9200 and 
// executes the script at http://queenjs.com/server-example.js
queen -r queen.turn.com:9200 http://queenjs.com/server-example.js

// Does the exact same thing, without requiring the entire queen package
queen-remote -h queen.turn.com:9200 http://queenjs.com/server-example.js

--heartbeatInterval <n> 60000 milliseconds (60 seconds) by default

Milliseconds clients have to send a heartbeat until they're considered unresponsive.

// Example
// Starts queen with heartbeat checks disabled
queen --heartbeatInterval 0

-v or --verbose

Enable debug logging.

-q or --quiet

Supress logging.