Skip to content

Commit ed5e8bc

Browse files
committed
Make localhost default
1 parent 945f883 commit ed5e8bc

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ program
102102
.description('mock a Tuya device for local testing')
103103
.option('-i, --id [id]', 'ID to use for mock device')
104104
.option('-k, --key [key]', 'key to use for mock device')
105-
.option('-a, --ip [key]', 'IP/host name to use for mock device')
105+
.option('-a, --ip <host>', 'IP/host name to use for mock device', 'localhost')
106106
.option('-s, --state [state]', 'inital state to use for device', JSON.stringify({1: true, 2: false}))
107107
.option('-u, --disableUDP', 'disable the UDP broadcast')
108108
.action(options => {

lib/mock.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ async function mock(config, options) {
1212

1313
// Create stub device
1414
const device = new Stub({id: options.id, key: options.key, ip: options.ip, state: JSON.parse(options.state)});
15-
if (options.ip != null)
16-
device.ip = options.ip;
1715

1816
// Start stub server
1917
await device.startServer();

0 commit comments

Comments
 (0)