mirror of
https://github.com/bitinflow/localtunnel.git
synced 2026-03-13 13:35:54 +00:00
Add ability to specify env variables (#161)
Update yargs dependency to enable the new functionality.
This commit is contained in:
@@ -33,6 +33,12 @@ Below are some common arguments. See `lt --help` for additional arguments
|
|||||||
* `--subdomain` request a named subdomain on the localtunnel server (default is random characters)
|
* `--subdomain` request a named subdomain on the localtunnel server (default is random characters)
|
||||||
* `--local-host` proxy to a hostname other than localhost
|
* `--local-host` proxy to a hostname other than localhost
|
||||||
|
|
||||||
|
You may also specify arguments via env variables. E.x.
|
||||||
|
|
||||||
|
```
|
||||||
|
PORT=3000 lt
|
||||||
|
```
|
||||||
|
|
||||||
## API ##
|
## API ##
|
||||||
|
|
||||||
The localtunnel client is also usable through an API (for test integration, automation, etc)
|
The localtunnel client is also usable through an API (for test integration, automation, etc)
|
||||||
|
|||||||
@@ -4,10 +4,11 @@ var open_url = require('openurl');
|
|||||||
|
|
||||||
var argv = require('yargs')
|
var argv = require('yargs')
|
||||||
.usage('Usage: $0 --port [num] <options>')
|
.usage('Usage: $0 --port [num] <options>')
|
||||||
|
.env(true)
|
||||||
.option('h', {
|
.option('h', {
|
||||||
alias: 'host',
|
alias: 'host',
|
||||||
describe: 'Upstream server providing forwarding',
|
describe: 'Upstream server providing forwarding',
|
||||||
default: 'https://localtunnel.me'
|
default: 'https://localtunnel.me',
|
||||||
})
|
})
|
||||||
.option('s', {
|
.option('s', {
|
||||||
alias: 'subdomain',
|
alias: 'subdomain',
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"axios": "0.17.1",
|
"axios": "0.17.1",
|
||||||
"debug": "2.6.8",
|
"debug": "2.6.8",
|
||||||
"openurl": "1.1.1",
|
"openurl": "1.1.1",
|
||||||
"yargs": "3.29.0"
|
"yargs": "6.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"mocha": "~1.17.0"
|
"mocha": "~1.17.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user