mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-13 12:55:19 +00:00
12 lines
No EOL
295 B
TypeScript
12 lines
No EOL
295 B
TypeScript
import 'server-only';
|
|
|
|
import Stripe from 'stripe'
|
|
import { STRIPE_SECRET_KEY } from './environment'
|
|
|
|
let stripeInstance: Stripe | null = null;
|
|
export const getStripe = () => {
|
|
if (!stripeInstance) {
|
|
stripeInstance = new Stripe(STRIPE_SECRET_KEY!);
|
|
}
|
|
return stripeInstance;
|
|
} |