From 1af752cdcb7c5e634874041a3d55b72c6cf6af7e Mon Sep 17 00:00:00 2001 From: amhsirak Date: Tue, 3 Dec 2024 21:09:19 +0530 Subject: [PATCH] refactor: move isProduction variable --- server/src/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/server.ts b/server/src/server.ts index e6fee5f2..87f334d2 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -18,6 +18,7 @@ import { fork } from 'child_process'; import { capture } from "./utils/analytics"; import swaggerUi from 'swagger-ui-express'; import swaggerSpec from './swagger/config'; +const isProduction = process.env.NODE_ENV === 'production'; const app = express(); app.use(cors({ @@ -62,7 +63,6 @@ readdirSync(path.join(__dirname, 'api')).forEach((r) => { } }); -const isProduction = process.env.NODE_ENV === 'production'; const workerPath = path.resolve(__dirname, isProduction ? './worker.js' : './worker.ts'); let workerProcess: any;