localtunnel-wrapper

Node.js wrapper for the localtunnel ruby client

node-localtunnel

Node.js wrapper for the localtunnel ruby client

  • should start the localtunnel client
  • should error if the binary does not exist
  • should error if stopped before started
  • should error if started when already running

The ruby localtunnel client should be installed and correctly configured with a public key

http://progrium.com/localtunnel/

npm install localtunnel-wrapper
var LocalTunnel = require('localtunnel-wrapper');
 
var localTunnel = new LocalTunnel(8080);
localTunnel.start(function(errorhostname) {
  if (error) {
    console.log(error);
  } else {
    // Now forwarding to local port 8080 through localtunnel.com 
    // The assigned hostname is given in the hostname parameter 
 
    localTunnel.stop(function(error) {
      if (error) {
        console.log(error);
      } else {
        // tunnel has stopped 
      }
    });
  }
});
  • Nothing yet

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 ./grunt.sh or .\grunt.bat.

Copyright (c) 2012 Peter Halliday
Licensed under the MIT license.