https://github.com/lufzle/localtunnel-es6-promise
Simple ES6 Promise wrapper for localtunnel.
https://github.com/lufzle/localtunnel-es6-promise
Last synced: 13 days ago
JSON representation
Simple ES6 Promise wrapper for localtunnel.
- Host: GitHub
- URL: https://github.com/lufzle/localtunnel-es6-promise
- Owner: lufzle
- License: mit
- Created: 2016-08-28T23:55:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-29T00:12:12.000Z (over 8 years ago)
- Last Synced: 2025-02-16T01:43:20.494Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# localtunnel-es6-promise
[](https://travis-ci.org/luisfarzati/localtunnel-es6-promise)
This package is similar to [`localtunnel`](https://www.npmjs.com/package/localtunnel) but uses native ES6 promises. [It's so small](/lib/index.js) that you might prefer to just write down the code in your app.
## installation ##
`localtunnel` is defined as a peer-dependency and thus has to be installed separately.
```
npm install localtunnel
npm install localtunnel-es6-promise
```## use ##
```javascript
import localtunnel from 'localtunnel-es6-promise';let tunnel = localtunnel(port).then(tunnel => {
// the assigned public url for your tunnel
// i.e. https://abcdefgjhij.localtunnel.me
tunnel.url;
}).catch(err => {
if (err) ...
});
```