fix incorrect default client host
This commit is contained in:
parent
64dbc20f4a
commit
fbcd3f77e9
2 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 $@"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue