import dotenv from "dotenv";
import path from "path";

dotenv.config({ path: path.resolve(process.cwd(), "..", ".env") });

export const NODE_ENV = process.env.NODE_ENV || "development";
export const IS_PRODUCTION = NODE_ENV === "production";
export const PORT = process.env.PORT || 3000;
export const OPENAI_MODEL = process.env.OPENAI_MODEL || "gpt-4.1-mini";
export const SITE_URL =
  process.env.SITE_URL ||
  (IS_PRODUCTION ? "https://coldbrewnlp.com" : `http://localhost:${PORT}`);
export const SITE_HOST = new URL(SITE_URL).host;
