From 56edc6bdbce20aef96cc7fba83c5e2af8b593e0c Mon Sep 17 00:00:00 2001 From: stjet <49297268+stjet@users.noreply.github.com> Date: Mon, 28 Apr 2025 00:06:43 +0000 Subject: [PATCH] port as cli arg --- host.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host.ts b/host.ts index 4642060..fa72783 100644 --- a/host.ts +++ b/host.ts @@ -14,7 +14,7 @@ function get_password(date: Date = new Date()): string { return hash.digest("hex"); } -const port: number = 8043; +const port: number = process.argv.map((arg) => Number(arg)).filter((arg) => !isNaN(arg))[0] ?? 8043; const stream_chunk_size: number = 2 * 1024 * 1024; //2 MiB //meant for running locally, where password is not needed and a hassle