mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
10 lines
318 B
TypeScript
10 lines
318 B
TypeScript
import { PostHog } from "posthog-node"
|
|
import { POSTHOG_API_KEY, POSTHOG_HOST } from "./constants/index.js"
|
|
|
|
const isProduction = process.env.NODE_ENV === "production"
|
|
|
|
export const posthog = isProduction
|
|
? new PostHog(process.env.POSTHOG_API_KEY || POSTHOG_API_KEY, {
|
|
host: POSTHOG_HOST,
|
|
})
|
|
: undefined
|