browserstacktunnel-wrapper

A Node.js wrapper for the BrowserStack java tunnel client

npm install browserstacktunnel-wrapper
330 downloads in the last day
1 739 downloads in the last week
8 264 downloads in the last month

node-BrowserStackTunnel

Build Status Dependency Status

A Node.js wrapper for the BrowserStack tunnel client. On first run this will download the appropriate binary for your platform from BrowserStack. On Windows this will be a Jar file and you will need to have Java already installed.

http://www.browserstack.com/

Installation

npm install browserstacktunnel-wrapper

API

var BrowserStackTunnel = require('browserstacktunnel-wrapper');

var browserStackTunnel = new BrowserStackTunnel({
  key: YOUR_KEY,
  hosts: [{
    name: 'localhost',
    port: 8080,
    sslFlag: 0
  }],
  osxBin: 'your_bin_dir', // optionally override the default bin directory for the OSX binary
  linux32Bin: 'your_bin_dir', // optionally override the default bin directory for the Linux 32 bit binary
  linux64Bin: 'your_bin_dir', // optionally override the default bin directory for the Linux 64 bit binary
  jarFile: 'your_jar_file', // on other platforms, optionally override the default path to the BrowserStackTunnel.jar file
  tunnelIdentifier: 'my_tunnel', // optionally set the -tunnelIdentifier option
  skipCheck: true // optionally set the -skipCheck option
});

browserStackTunnel.start(function(error) {
  if (error) {
    console.log(error);
  } else {
    // tunnel has started

    browserStackTunnel.stop(function(error) {
      if (error) {
        console.log(error);
      } else {
        // tunnel has stopped
      }
    });
  }
});

Roadmap

  • Nothing yet

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using npm test.

License

Copyright © 2014 Peter Halliday
Licensed under the MIT license.

Donate Bitcoins

npm loves you