Skip to main content

Node and server SDK

@superflag-sh/node synchronizes advanced configuration with a secret server key and evaluates it locally through @superflag-sh/core.
The current package requires Node 20 or newer. It also runs in Bun, Deno, serverless, and edge runtimes that provide standard fetch and AbortController APIs.

Create a server key

Create an environment-scoped sdk_ key in the dashboard or CLI, then store it in a server-only secret:
Never use NEXT_PUBLIC_* or EXPO_PUBLIC_* for a server key. Do not include it in a browser bundle, mobile app, response, log, or persisted cache.

Create one client

Create the client once at module scope so concurrent requests share one in-memory configuration cache and coalesced refresh work.

Use flags on the server

Add request targeting, typed values, and diagnostics.

API reference

Review methods, options, state, and failure behavior.