The `rox-node` package is the Node.js SDK for CloudBees Feature Management (formerly Rollout.io), offering capabilities for defining and managing feature flags, remote configuration variables, and custom properties within Node.js applications. Currently stable at version 6.0.8, this SDK enables developers to control application features dynamically via the CloudBees Feature Management dashboard, facilitating controlled rollouts, A/B testing, and targeted user experiences. It is designed for enterprise-grade feature management, providing secure and scalable solutions for accelerating development and minimizing deployment risk. The package is updated regularly, with its latest version published approximately four months ago as of late 2025. Key differentiators include its focus on secure feature management, advanced target grouping, and integration with the CloudBees ecosystem, which caters to complex production environments by allowing dynamic control over features without requiring code redeployments.
npm install rox-nodeVerified import paths — ran on the pinned version, not inferred.
Demonstrates the asynchronous initialization of the `rox-node` SDK, registration of feature flags (boolean, string, and number types), and evaluation of these flags after setup. It emphasizes using environment variables for the SDK key and includes basic error handling.
Ensure all `Rox.Flag`, `Rox.RoxString`, and `Rox.RoxNumber` constructors are passed a sensible default value that dictates application behavior in the absence of remote configuration.
Run `npm i @types/rox-node --save-dev` to install the necessary TypeScript declaration files.
Always call `Rox.setup` using `await` within an `async` function, or chain `.then()` and `.catch()` to handle the promise. Ensure flag evaluation logic runs only after `Rox.setup` resolves.
Store your SDK key securely in environment variables (e.g., `process.env.ROX_SDK_KEY`) and inject it into your application at runtime. Avoid committing sensitive keys to version control.
Wrap `Rox.setup` in a `try-catch` block and consider implementing a timeout or retry mechanism. Ensure your application can function correctly with default flag values if network access to the feature management service is unavailable.
Run `npm install rox-node` or `yarn add rox-node` to install the package. Ensure your environment's `NODE_PATH` is correctly configured if not using standard `node_modules` resolution.
Verify `import Rox from 'rox-node';` is at the top of your file. Ensure that `Rox.setup` has been called and `await`ed before `new Rox.Flag()` is invoked.
Ensure that your `flags` object is correctly defined and `Rox.register('', flags)` has been executed before attempting to access `flags.myFlag.isEnabled()` or `flags.myString.getValue()`. Additionally, ensure `Rox.setup` has finished.For serverless functions (e.g., AWS Lambda, Vercel), ensure `rox-node` is included in your deployment package. Check build steps to confirm `node_modules` are correctly packaged. Verify `rox-node` is listed in your `dependencies` in `package.json` for production deployments.
No dependency data recorded yet.