feat: add payment module
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { join } from "node:path";
|
||||
|
||||
import { load } from "@std/dotenv";
|
||||
|
||||
const env = await load();
|
||||
const env = await load({ envPath: getDotEnvPath(), export: true });
|
||||
|
||||
/**
|
||||
* TODO ...
|
||||
@@ -8,3 +10,11 @@ const env = await load();
|
||||
export function getDotEnvVariable(key: string): string {
|
||||
return env[key] ?? Deno.env.get(key);
|
||||
}
|
||||
|
||||
function getDotEnvPath(): string {
|
||||
const dirname = import.meta.dirname;
|
||||
if (dirname === undefined) {
|
||||
throw new Error("Unable to determine dirname in config");
|
||||
}
|
||||
return join(dirname, "..", "..", ".env");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user