mirror of
https://github.com/bitinflow/localtunnel.git
synced 2026-03-16 06:55:54 +00:00
refactor into files
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user