From 50a70ed6a332ec1e8a2e17ca94e74252e1a8cdcb Mon Sep 17 00:00:00 2001 From: Florrie Date: Sat, 11 Jul 2020 17:50:24 -0300 Subject: let client specify host through command line --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 97b9504..2c352cd 100755 --- a/index.js +++ b/index.js @@ -190,7 +190,10 @@ async function main() { if (options['socket-client']) { socketClient = makeSocketClient() - socketClient.socket.connect(options['socket-client']) + const [ p1, p2 ] = options['socket-client'].split(':') + const host = p2 && p1 + const port = p2 ? p2 : p1 + socketClient.socket.connect(port, host) } if (socketClient) { -- cgit 1.3.0-6-gf8a5