feat: feature flags

This commit is contained in:
David Nguyen
2023-08-18 20:05:14 +10:00
parent e0cb4314fb
commit f60cb22f11
23 changed files with 661 additions and 36 deletions

View File

@ -0,0 +1,16 @@
import { PostHog } from 'posthog-node';
import { extractPostHogConfig } from '@documenso/lib/constants/feature-flags';
export default function PostHogServerClient() {
const postHogConfig = extractPostHogConfig();
if (!postHogConfig) {
return null;
}
return new PostHog(postHogConfig.key, {
host: postHogConfig.host,
fetch: (...args) => fetch(...args),
});
}