feat: add config
This commit is contained in:
1
.env.example
Normal file
1
.env.example
Normal file
@@ -0,0 +1 @@
|
|||||||
|
OPENROUTER_API_KEY=
|
||||||
12
src/config.ts
Normal file
12
src/config.ts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import "dotenv/config";
|
||||||
|
|
||||||
|
export interface Config {
|
||||||
|
openrouterApiKey: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const openrouterApiKey = process.env["OPENROUTER_API_KEY"];
|
||||||
|
if (!openrouterApiKey) throw new Error("OPENROUTER_API_KEY is missing");
|
||||||
|
|
||||||
|
export const config: Config = {
|
||||||
|
openrouterApiKey: openrouterApiKey,
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user