How to use the localtunnel.connect function in localtunnel

To help you get started, we’ve selected a few localtunnel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github matthewmueller / component-test / lib / tunnel.js View on Github external
function tunnel(port, fn) {
  var client = localtunnel.connect({
    host: 'http://localtunnel.me',
    port: port
  });

  client.on('url', function(url) {
    fn(null, url);
  });

  return client;
}
github airtap / airtap / lib / tunnel.js View on Github external
module.exports = function(port, cb) {
    debug('tunnel requested to port %d', port);

    var client = localtunnel.connect({
        host: 'http://localtunnel.me',
        port: port
    });

    client.on('url', function(url) {
        cb(null, url);
    });

    return client;
};

localtunnel

Expose localhost to the world

MIT
Latest version published 3 years ago

Package Health Score

65 / 100
Full package analysis