diff --git a/app.js b/app.js index 4bbc2d4..88dcc79 100644 --- a/app.js +++ b/app.js @@ -1,3 +1,4 @@ +require('dotenv').config() import express from "express"; import { config } from "dotenv"; import course from "./routes/courseRoutes.js"; @@ -6,9 +7,9 @@ import ErrorMiddleware from "./middlewares/Error.js"; import cookieParser from "cookie-parser"; import cors from "cors"; -config({ - path: "./configs/config.env", -}); +// config({ +// path: "./configs/config.env", +// }); const app = express(); app.use( diff --git a/configs/config.env b/configs/config.env index bfb3be4..c44abe5 100644 --- a/configs/config.env +++ b/configs/config.env @@ -2,3 +2,4 @@ PORT=4000 MONGO_URI=mongodb://0.0.0.0:27017/coursebundle FRONTEND_URL=http://localhost:3000 JWT_SECRET= eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c +BACKEND_URL=http://localhost:4000