From 4aa207cbe8f02ae696ec9747fbf758657778e829 Mon Sep 17 00:00:00 2001
From: timothycarambat <rambat1010@gmail.com>
Date: Thu, 8 Jun 2023 10:29:17 -0700
Subject: [PATCH] bump node version requirement add conditional ENV setting

---
 frontend/.nvmrc            | 2 +-
 package.json               | 3 +++
 server/endpoints/system.js | 2 +-
 server/index.js            | 2 +-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/frontend/.nvmrc b/frontend/.nvmrc
index 95c758cad..59f4a2f3a 100644
--- a/frontend/.nvmrc
+++ b/frontend/.nvmrc
@@ -1 +1 @@
-v18.12.1
\ No newline at end of file
+v18.13.0
\ No newline at end of file
diff --git a/package.json b/package.json
index bab164aca..953ea9f0a 100644
--- a/package.json
+++ b/package.json
@@ -5,6 +5,9 @@
   "main": "index.js",
   "author": "Timothy Carambat (Mintplex Labs)",
   "license": "MIT",
+  "engines": {
+    "node": ">=18"
+  },
   "scripts": {
     "lint": "cd server && yarn lint && cd .. && cd frontend && yarn lint",
     "setup": "cd server && yarn && cd .. && yarn setup:envs && echo \"Please run yarn dev:server and yarn dev:frontend in separate terminal tabs.\"",
diff --git a/server/endpoints/system.js b/server/endpoints/system.js
index b86af9f09..158e30003 100644
--- a/server/endpoints/system.js
+++ b/server/endpoints/system.js
@@ -1,4 +1,4 @@
-require("dotenv").config({ path: `.env.${process.env.NODE_ENV}` });
+if (process.env.NODE_ENV === 'development') require("dotenv").config({ path: `.env.${process.env.NODE_ENV}` });
 const { viewLocalFiles } = require("../utils/files");
 const { getVectorDbClass } = require("../utils/helpers");
 
diff --git a/server/index.js b/server/index.js
index a8d22b44f..00a412faa 100644
--- a/server/index.js
+++ b/server/index.js
@@ -1,4 +1,4 @@
-require("dotenv").config({ path: `.env.${process.env.NODE_ENV}` });
+if (process.env.NODE_ENV === 'development') require("dotenv").config({ path: `.env.${process.env.NODE_ENV}` });
 const express = require("express");
 const bodyParser = require("body-parser");
 const cors = require("cors");
-- 
GitLab