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

dotenv.config();

const PORT = Number(process.env.PORT || 8080);
const NOTES_DIR = process.env.NOTES_DIR || path.resolve("/data/notes");

const AUTH_USERNAME = process.env.AUTH_USERNAME || "admin";
const AUTH_PASSWORD_HASH = process.env.AUTH_PASSWORD_HASH || "";

const ANYTHINGLLM_ROOT_API_URL = process.env.ANYTHINGLLM_ROOT_API_URL || "";
const ANYTHINGLLM_API_KEY = process.env.ANYTHINGLLM_API_KEY || "";
const ANYTHINGLLM_WORKSPACE_SLUG = process.env.ANYTHINGLLM_WORKSPACE_SLUG || "";

export const config = {
  PORT,
  NOTES_DIR,
  AUTH_USERNAME,
  AUTH_PASSWORD_HASH,
  ANYTHINGLLM_ROOT_API_URL,
  ANYTHINGLLM_API_KEY,
  ANYTHINGLLM_WORKSPACE_SLUG
};
