mirror of
https://github.com/stackblitz/bolt.new
synced 2024-11-30 23:56:07 +00:00
10 lines
321 B
TypeScript
10 lines
321 B
TypeScript
|
import { env } from 'node:process';
|
||
|
|
||
|
export function getAPIKey(cloudflareEnv: Env) {
|
||
|
/**
|
||
|
* The `cloudflareEnv` is only used when deployed or when previewing locally.
|
||
|
* In development the environment variables are available through `env`.
|
||
|
*/
|
||
|
return env.ANTHROPIC_API_KEY || cloudflareEnv.ANTHROPIC_API_KEY;
|
||
|
}
|