refactor into files

This commit is contained in:
Roman Shtylman
2014-12-21 17:46:38 -08:00
parent ddb47d2f90
commit 809262cf3d
5 changed files with 314 additions and 296 deletions

View File

@@ -42,13 +42,17 @@ Creates a new localtunnel to the specified local `port`. `fn` will be called onc
```javascript
var localtunnel = require('localtunnel');
localtunnel(port, function(err, tunnel) {
var tunnel = localtunnel(port, function(err, tunnel) {
if (err) ...
// the assigned public url for your tunnel
// i.e. https://abcdefgjhij.localtunnel.me
tunnel.url;
});
tunnel.on('close', function() {
// tunnels are closed
});
```
### opts