Rule browsers remotely, remotely
Write Queen applications which run Queen Scripts on a remote Queen Server.
This library provides the tooling required to write Queen applications which can utilize a remote
Queen Server as if it were local. This is particularly useful in creating thin-client applications
which harness the full power of Queen. This package also comes with the
allowing you to execute Queen Scripts remotely through a remote Queen Server.
npm install -g queen-remote
queen-remote -h queen.turn.com:9200 http://queenjs.com/server-example.js
This will establish a connection to the Queen Server running at queen.turn.com:9200, and execute the server-example.js Queen Script on it with all of it's captured browsers.
The host of the Queen Server to connect to.
// Example// Starts queen-remote and connect to a Queen Server running at queen.turn.com:9283queen-remote -h queen.turn.com:9283
Sets up this queen-remote instance to pretend to be a Queen Server which other queen-remote applications can connect to. It will act as a proxy to the real Queen Server and relay communications accordingly.
// Example// Starts queen-remote and connect to a Queen Server running at queen.turn.com:9283// then starts listening on localhost:9122 for other queen-remote instances to connect to this server// when they do, it will relay their requests to queen.turn.com:9283queen-remote -h queen.turn.com:9283 -p localhost:9122
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// These examples all try to connect to a Queen Server running on localhost:9200// Starts Queen Remote with configuration defined in queenConfig.js// if it exists in the current directory, or defaults otherwisequeen-remote -h localhost:9200// Starts Queen Remote with a configuration file that is not named queenConfig.jsqueen-remote -h localhost:9200 my-config-file.js// Starts Queen Remote with default options and executes the my-queen-script.js when Queen is readyqueen-remote -h localhost:9200 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.
Enable debug logging.
Importing this module via
require('queen-remote') will give you an object with the following properties.
client- This is an object which implements the Queen module API and takes an additional "host" variable in it's options object -- the host of the remote server. So long as you give it the host, you can do all the things you can do with the a real Queen Server API with it.
server- A RPC server that the Queen Server uses to accept connections from queen-remote clients.
runner- The runner function that both Queen Server and Queen Remote uses to start up via their command line interfaces.