From e536fb2f72e4883979b451b60b12c44f5f94313c Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Mon, 18 Jul 2022 18:30:53 +0200 Subject: replace all var with let (reduces warnings) --- api/src/start.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'api/src/start.ts') diff --git a/api/src/start.ts b/api/src/start.ts index ccb4d108..841ad3d5 100644 --- a/api/src/start.ts +++ b/api/src/start.ts @@ -7,7 +7,7 @@ config(); import { FosscordServer } from "./Server"; import cluster from "cluster"; import os from "os"; -var cores = 1; +let cores = 1; try { cores = Number(process.env.THREADS) || os.cpus().length; } catch { @@ -27,7 +27,7 @@ if (cluster.isMaster && process.env.NODE_ENV == "production") { cluster.fork(); }); } else { - var port = Number(process.env.PORT) || 3001; + let port = Number(process.env.PORT) || 3001; const server = new FosscordServer({ port }); server.start().catch(console.error); -- cgit 1.5.1