feat: add dbPath to config

This commit is contained in:
2026-05-31 23:43:12 +09:00
parent b5bf5b72ed
commit c218263b8a
2 changed files with 6 additions and 1 deletions

View File

@@ -1 +1,3 @@
DB_PATH=
OPENROUTER_API_KEY=

View File

@@ -2,11 +2,14 @@ import "dotenv/config";
export interface Config {
openrouterApiKey: string;
dbPath: string;
}
const openrouterApiKey = process.env["OPENROUTER_API_KEY"];
if (!openrouterApiKey) throw new Error("OPENROUTER_API_KEY is missing");
const dbPath = process.env["DB_PATH"] ?? "sqlite.db";
export const config: Config = {
openrouterApiKey: openrouterApiKey,
openrouterApiKey,
dbPath,
};