From bdf5ad1b1cca75a4e5008bfa4c7cae8f06d8fd48 Mon Sep 17 00:00:00 2001 From: Wolvan Date: Sat, 8 Jan 2022 17:42:55 +0100 Subject: [PATCH] Fix number parsing from replacer vars --- src/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 0ef09d3..e30d44e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -15,10 +15,10 @@ async function main(): Promise { ["--no-frontend", "Do not start the frontend server"], ["--no-backend", "Do not start the backend server"], ["-d, --data-directory ", "Path to the data directory", "./data"], - ["-p, --port ", "Port to listen on", (port: any) => parseInt(port), 6969], + ["-p, --port ", "Port to listen on", (port: any) => parseInt(port) || port, 6969], ["--use-mysql", "Use MySQL for storage"], ["--mysql-host ", "MySQL host", "localhost"], - ["--mysql-port ", "MySQL port", (port: any) => parseInt(port), 3306], + ["--mysql-port ", "MySQL port", (port: any) => parseInt(port) || port, 3306], ["--mysql-user ", "MySQL user", "root"], ["--mysql-password ", "MySQL password", "root"], ["--mysql-database ", "MySQL database", "polls"],