feat: add dbPath to config
This commit is contained in:
@@ -1 +1,3 @@
|
|||||||
|
DB_PATH=
|
||||||
|
|
||||||
OPENROUTER_API_KEY=
|
OPENROUTER_API_KEY=
|
||||||
|
|||||||
@@ -2,11 +2,14 @@ import "dotenv/config";
|
|||||||
|
|
||||||
export interface Config {
|
export interface Config {
|
||||||
openrouterApiKey: string;
|
openrouterApiKey: string;
|
||||||
|
dbPath: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const openrouterApiKey = process.env["OPENROUTER_API_KEY"];
|
const openrouterApiKey = process.env["OPENROUTER_API_KEY"];
|
||||||
if (!openrouterApiKey) throw new Error("OPENROUTER_API_KEY is missing");
|
if (!openrouterApiKey) throw new Error("OPENROUTER_API_KEY is missing");
|
||||||
|
const dbPath = process.env["DB_PATH"] ?? "sqlite.db";
|
||||||
|
|
||||||
export const config: Config = {
|
export const config: Config = {
|
||||||
openrouterApiKey: openrouterApiKey,
|
openrouterApiKey,
|
||||||
|
dbPath,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user