Skip to content

Commit a60803e

Browse files
committed
feature(): Simplify API
1 parent bdb31de commit a60803e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/lcp.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ var lcp = require('../lib/index.js');
44
var commandLineArgs = require('command-line-args');
55

66
var optionDefinitions = [
7-
{ name: 'port', alias: 'p', type: Number, defaultValue: 8010 },
7+
{ name: 'proxyPort', alias: 'p', type: Number, defaultValue: 8010 },
88
{
99
name: 'proxyPartial',
1010
type: String,
1111
defaultValue: '/proxy'
1212
},
13-
{ name: 'proxyUrl', type: String, defaultValue: 'http://localhost:9000' },
13+
{ name: 'port', type: String, defaultValue: '9000' },
1414
{ name: 'credentials', type: Boolean, defaultValue: false },
1515
{ name: 'origin', type: String, defaultValue: '*' },
1616
{ name: 'webhookStore', type: String }
@@ -21,7 +21,7 @@ try {
2121
if (!options.webhookStore) {
2222
throw new Error('--webhookStore is required. example --webhookStore https://claimyourdomain.webhook.store');
2323
}
24-
lcp.startProxy(options.port, options.proxyUrl, options.proxyPartial, options.credentials, options.origin, options.webhookStore);
24+
lcp.startProxy(options.proxyPort, 'http://localhost:'+options.port, options.proxyPartial, options.credentials, options.origin, options.webhookStore);
2525
} catch (error) {
2626
console.error(error);
2727
}

0 commit comments

Comments
 (0)