Something went wrong. Try again.
A Deno-powered backend service for Plants vs. Zombies: MODDED. [Read-only GitHub mirror] docs.pvzm.net
express typescript expressjs plant deno jspvz pvzm game online backend plants-vs-zombies zombie javascript plants modded vs plantsvszombies openapi pvz noads
Something went wrong. Try again.
1234567891011121314151617181920212223242526import { PostHog } from "posthog-node";
import type { ServerConfig } from "./config.ts";
export let postHogClient: PostHog | null = null;
export function initPostHog(config: ServerConfig): PostHog | null { if (!config.usePostHogAnalytics) { return null; } console.log("Initializing PostHog analytics");
const postHog = new PostHog(config.postHogApiKey, { host: config.postHogHost, });
postHogClient = postHog; return postHog;}
export function shutdownPostHog(client: PostHog | null) { if (client) { client.shutdown(); }}