MCPcopy Create free account
hub / github.com/code-with-antonio/nightcode / getRequiredEnv

Function getRequiredEnv

packages/server/src/lib/polar.ts:5–11  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

3type PolarServer = "sandbox" | "production";
4
5function getRequiredEnv(name: string) {
6 const value = process.env[name];
7 if (!value) {
8 throw new Error(`${name} environment variable is required`);
9 }
10 return value;
11}
12
13export function getPolarAccessToken() {
14 return getRequiredEnv("POLAR_ACCESS_TOKEN");

Callers 3

getPolarAccessTokenFunction · 0.85
getPolarProductIdFunction · 0.85
getPolarCreditsMeterIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected