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

Function getPolarServer

packages/server/src/lib/polar.ts:25–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23}
24
25export function getPolarServer(): PolarServer {
26 const server = process.env.POLAR_SERVER;
27 if (!server) {
28 return "sandbox";
29 }
30
31 if (server !== "sandbox" && server !== "production") {
32 throw new Error("POLAR_SERVER must be either 'sandbox' or 'production'");
33 }
34
35 return server;
36}
37
38const polar = new Polar({
39 accessToken: getPolarAccessToken(),

Callers 1

polar.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected