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[]) {
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);
}