Use Reflag in your CLI
High-level guide to flagging features in your CLI
Last updated
Was this helpful?
Was this helpful?
import { ReflagClient } from "@reflag/node-sdk";
// configure the client
const boundClient = reflagClient.bindClient({
user: {
id: "c1_u1",
name: "John Doe"
},
company: {
id: "c1",
name: "Acme, Inc."
},
});
// get flags
const flags = boundClient.getFlags();if(flags['myflag'].isEnabled) {
//feature access
}import { ReflagClient } from "@reflag/node-sdk";
// configure the client
const boundClient = reflagClient.bindClient({
user: {
id: "c1_u1",
name: "John Doe"
},
company: {
id: "c1",
name: "Acme, Inc."
},
});const { isEnabled } = boundClient.getFlag("myflag");
if (isEnabled) {
//feature access
} const flags = boundClient.getFlags();