fix: use dotenv to load .env.local file

This commit is contained in:
Paul Makles
2025-03-04 15:03:10 +00:00
parent 76199ce7ce
commit bc591844a1
4 changed files with 5 additions and 1 deletions
BIN
View File
Binary file not shown.
+1
View File
@@ -20,6 +20,7 @@
"archiver-zip-encrypted": "^2.0.0",
"babel-plugin-react-compiler": "^0.0.0-experimental-1f3db3d-20240818",
"dayjs": "^1.11.10",
"dotenv": "^16.4.7",
"eslint-plugin-react-compiler": "experimental",
"lru-cache": "^10.2.0",
"mongodb": "^6.3.0",
+3
View File
@@ -7,6 +7,7 @@ import {
red,
yellow,
} from "@colors/colors";
import { config } from "dotenv";
import { readFile, readdir } from "fs/promises";
import { createServer } from "http";
import next from "next";
@@ -15,6 +16,8 @@ import { parse } from "url";
import { createLogger } from "./logger";
config({ path: ".env.local" });
const dev = process.env.NODE_ENV !== "production";
const hostname = process.env.HOST || "localhost";
const port = parseInt(process.env.PORT || "3000");