From fedc3d2f616592770c16190cdef6a326988070fe Mon Sep 17 00:00:00 2001 From: acidumirae Date: Tue, 25 Jun 2024 16:06:18 +0800 Subject: [PATCH] ENV variables fix --- .env | 2 +- index.js | 2 ++ package.json | 7 ++++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.env b/.env index a818d49..a827625 100644 --- a/.env +++ b/.env @@ -15,4 +15,4 @@ COMMON_CONTRACT_PATH='wrenchboard/wrenchboard/TEST/CONTRACTS' #COMMON_DUMMY_PATH='wrenchboard/wrenchboard/LIVE/DUMMY' #COMMON_MYFILE_PATH='/wrenchboard/wrenchboard/LIVE/PROFILE' -COMMON_CONTRACT_PATH='wrenchboard/wrenchboard/LIVE/CONTRACTS' \ No newline at end of file +#COMMON_CONTRACT_PATH='wrenchboard/wrenchboard/LIVE/CONTRACTS' \ No newline at end of file diff --git a/index.js b/index.js index 7ee5267..e3e907a 100644 --- a/index.js +++ b/index.js @@ -5,6 +5,8 @@ const app = express() const cors = require("cors"); const multer = require('multer') +require('dotenv').config(); + const ENV_PARAM = process.env; // const videoFileMap2={ // 'cdn':'videos/v1.mp4', diff --git a/package.json b/package.json index 8b82fc2..e10f2ac 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,9 @@ "dependencies": { "axios": "^1.6.7", "body-parser": "^1.19.0", + "cors": "^2.8.5", + "dotenv": "^16.4.5", + "express": "^4.18.2", "multer": "^1.4.5-lts.1", "openai": "^4.28.4", "openapi-types": "^10.0.0", @@ -25,9 +28,7 @@ "underscore": "^1.8.3", "url": "^0.11.0", "winston": "^2.3.1", - "winston-papertrail": "^1.0.4", - "cors": "^2.8.5", - "express": "^4.18.2" + "winston-papertrail": "^1.0.4" }, "devDependencies": { "eslint": "^8.57.0",