diff options
Diffstat (limited to 'api/src/start.ts')
-rw-r--r-- | api/src/start.ts | 4 |
1 files changed, 2 insertions, 2 deletions
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); |