CF-Incidents Flagship - Flagship now in public beta

Cloudflare Service Informational Feeds

ENF News Bot

Automated News Bot
Joined
Apr 15, 2022
Messages
2,591
Flagship is now in public beta. Evaluate feature flags directly from Cloudflare Workers with no outbound HTTP calls, using globally distributed flag configuration backed by Workers KV and Durable Objects. Flagship supports typed flag values, targeting rules, percentage rollouts, audit history, and OpenFeature-compatible SDKs.

Evaluate a flag from a Worker in a few lines of code:

src/index.jsjs

Code:
export default {
	async fetch(request, env) {
		const showNewCheckout = await env.FLAGS.getBooleanValue(
			"new-checkout",
			false,
		);

		return new Response(showNewCheckout ? "New checkout" : "Standard checkout");
	},
};
src/index.tsts

Code:
export default {
	async fetch(request: Request, env: Env): Promise<Response> {
		const showNewCheckout = await env.FLAGS.getBooleanValue("new-checkout", false);

		return new Response(
			showNewCheckout ? "New checkout" : "Standard checkout",
		);
	},
} satisfies ExportedHandler<Env>;

Start creating flags from the Cloudflare dashboard today. Refer to the Flagship documentation to get started.

Continue reading...
 
Back
Top