mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-10 21:01:41 +00:00
update
This commit is contained in:
24
node_modules/localtunnel/client.js
generated
vendored
Normal file
24
node_modules/localtunnel/client.js
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
var debug = require('debug')('localtunnel:client');
|
||||
|
||||
var Tunnel = require('./lib/Tunnel');
|
||||
|
||||
module.exports = function localtunnel(port, opt, fn) {
|
||||
if (typeof opt === 'function') {
|
||||
fn = opt;
|
||||
opt = {};
|
||||
}
|
||||
|
||||
opt = opt || {};
|
||||
opt.port = port;
|
||||
|
||||
var client = Tunnel(opt);
|
||||
client.open(function(err) {
|
||||
if (err) {
|
||||
return fn(err);
|
||||
}
|
||||
|
||||
fn(null, client);
|
||||
});
|
||||
return client;
|
||||
};
|
Reference in New Issue
Block a user