From fbcd3f77e97277daea0cbb0fbc27086ce0a558d9 Mon Sep 17 00:00:00 2001 From: Matthieu Jolimaitre Date: Wed, 10 Apr 2024 11:01:31 +0200 Subject: [PATCH] fix incorrect default client host --- client/main.ts | 3 ++- server/watch.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/main.ts b/client/main.ts index 102423f..3eb10e9 100755 --- a/client/main.ts +++ b/client/main.ts @@ -30,7 +30,7 @@ async function main() { function parse_args(args: string[]) { const [host_, port_] = args; - let host = "localhost"; + let host = "127.0.0.1"; if (host_ !== undefined) host = host_; let port = 9999; if (port_ !== undefined) port = parseInt(port_); @@ -120,6 +120,7 @@ class ServerInterface { } static async connect(hostname: string, port: number) { + log("Connectiong to", { hostname, port }); const connection = await Deno.connect({ hostname, port }); return await ServerInterface.init(connection); } diff --git a/server/watch.sh b/server/watch.sh index 350b253..d3f1ab5 100755 --- a/server/watch.sh +++ b/server/watch.sh @@ -2,4 +2,4 @@ set -e cd "$(dirname "$(realpath "$0")")" -nodemon -w ../common -w . -e ts -x 'clear && ./main.ts' +nodemon -w ../common -w . -e ts -x "clear && ./main.ts $@"