[{"data":1,"prerenderedAt":90},["ShallowReactive",2],{"docs:\u002Fdocs\u002Fnode":3,"docs-navigation":49},{"id":4,"title":5,"body":6,"description":16,"extension":42,"meta":43,"navigation":44,"path":45,"seo":46,"stem":47,"__hash__":48},"docs\u002Fdocs\u002Fnode.md","Node.js quickstart",{"type":7,"value":8,"toc":39},"minimark",[9,13,17,28,36],[10,11,5],"h1",{"id":12},"nodejs-quickstart",[14,15,16],"p",{},"Use the server SDK with Node.js 20 or later. Keep the server key in a secret environment variable. The SDK downloads your application's rules and evaluates flags in memory.",[18,19,25],"pre",{"className":20,"code":22,"language":23,"meta":24},[21],"language-sh","npm install @dipswitch\u002Fsdk-node\n","sh","",[26,27,22],"code",{"__ignoreMap":24},[18,29,34],{"className":30,"code":32,"language":33,"meta":24},[31],"language-ts","import { createClient } from '@dipswitch\u002Fsdk-node'\n\nconst serverKey = process.env.DIPSWITCH_SERVER_KEY\nif (!serverKey) throw new Error('Set DIPSWITCH_SERVER_KEY')\n\nconst flags = createClient({ serverKey })\nawait flags.ready\n\nexport const useNewCheckout = (userId: string) => flags.isEnabled('new-checkout', userId, false)\nexport const stopFlags = () => flags.close()\n","ts",[26,35,32],{"__ignoreMap":24},[14,37,38],{},"Create one client for each application and environment used by your service, then reuse that client for every request. Close it on shutdown. A check uses the configured default if rules have not loaded or the flag is missing.",{"title":24,"searchDepth":40,"depth":40,"links":41},2,[],"md",{},true,"\u002Fdocs\u002Fnode",{"title":5,"description":16},"docs\u002Fnode","E_JeGmM47LtYmggejY95zvv6UYWhSSyRryWAusMb6oU",[50,53,56,59,62,65,68,71,72,75,78,81,84,87],{"path":51,"title":52},"\u002Fdocs","Dipswitch documentation",{"path":54,"title":55},"\u002Fdocs\u002Fdotnet",".NET quickstart",{"path":57,"title":58},"\u002Fdocs\u002Fidentity","Verify user identity",{"path":60,"title":61},"\u002Fdocs\u002Fjava","Java quickstart",{"path":63,"title":64},"\u002Fdocs\u002Fjavascript","JavaScript quickstart",{"path":66,"title":67},"\u002Fdocs\u002Flaunchdarkly","Migrate from LaunchDarkly",{"path":69,"title":70},"\u002Fdocs\u002Fmanagement-api","Management API",{"path":45,"title":5},{"path":73,"title":74},"\u002Fdocs\u002Fopenfeature","OpenFeature and OFREP",{"path":76,"title":77},"\u002Fdocs\u002Fphp","PHP quickstart",{"path":79,"title":80},"\u002Fdocs\u002Fplans","Plans and limits",{"path":82,"title":83},"\u002Fdocs\u002Frate-limits","Rate limits",{"path":85,"title":86},"\u002Fdocs\u002Freact","React quickstart",{"path":88,"title":89},"\u002Fdocs\u002Fvue","Vue quickstart",1795767833783]