localtunnel-wrapper

0.0.2 • Public • Published

node-localtunnel

Node.js wrapper for the localtunnel ruby client

Features

  • 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

Prerequisites

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

http://progrium.com/localtunnel/

Installation

npm install localtunnel-wrapper

API

var LocalTunnel = require('localtunnel-wrapper');
 
var localTunnel = new LocalTunnel(8080);
localTunnel.start(function(error, hostname) {
  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
      }
    });
  }
});

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

License

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

Dependencies (1)

Dev Dependencies (3)

Package Sidebar

Install

npm i localtunnel-wrapper

Weekly Downloads

1

Version

0.0.2

License

none

Last publish

Collaborators

  • pghalliday