port as cli arg

This commit is contained in:
stjet
2025-04-28 00:06:43 +00:00
parent 4ebc65d6c9
commit 56edc6bdbc

View File

@@ -14,7 +14,7 @@ function get_password(date: Date = new Date()): string {
return hash.digest("hex"); 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 const stream_chunk_size: number = 2 * 1024 * 1024; //2 MiB
//meant for running locally, where password is not needed and a hassle //meant for running locally, where password is not needed and a hassle