fix incorrect default client host

This commit is contained in:
Matthieu Jolimaitre 2024-04-10 11:01:31 +02:00
parent 64dbc20f4a
commit fbcd3f77e9
2 changed files with 3 additions and 2 deletions

View file

@ -30,7 +30,7 @@ async function main() {
function parse_args(args: string[]) { function parse_args(args: string[]) {
const [host_, port_] = args; const [host_, port_] = args;
let host = "localhost"; let host = "127.0.0.1";
if (host_ !== undefined) host = host_; if (host_ !== undefined) host = host_;
let port = 9999; let port = 9999;
if (port_ !== undefined) port = parseInt(port_); if (port_ !== undefined) port = parseInt(port_);
@ -120,6 +120,7 @@ class ServerInterface {
} }
static async connect(hostname: string, port: number) { static async connect(hostname: string, port: number) {
log("Connectiong to", { hostname, port });
const connection = await Deno.connect({ hostname, port }); const connection = await Deno.connect({ hostname, port });
return await ServerInterface.init(connection); return await ServerInterface.init(connection);
} }

View file

@ -2,4 +2,4 @@
set -e set -e
cd "$(dirname "$(realpath "$0")")" cd "$(dirname "$(realpath "$0")")"
nodemon -w ../common -w . -e ts -x 'clear && ./main.ts' nodemon -w ../common -w . -e ts -x "clear && ./main.ts $@"