ripe-oyster-41378
export function getServerSideGrowthBookContext(req) { // Set GrowthBook polyfills for server environments setPolyfills({ fetch: require("cross-fetch"), EventSource: require("eventsource"), SubtleCrypto: require("node:crypto")?.webcrypto?.subtle }); return { apiHost: "<https://cdn.growthbook.io>", clientKey: "some_key", enableDevMode: true, attributes: { // TODO: get more targeting attributes from request context deviceId: "151515151", }, } }
Open source platform for stress free deployments, measured impact, and smarter decisions.