Skip to content

simen-sandbox/feature-toggling-talk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

Feature Toggle

This repository holds a few examples of how to implement feature toggles.

The concept

Early in a project, where there are no feature toggles, you can introduce a simple isEnabled function that returns false. The idea here is this enables creating the feature and deploying it, even though it is not enabled – yet.

see 0-starting-point.ts

deno run ./1-enabling-the-first-toggl.ts

Best part of this is that you can merge PRs, deploy it.

Enabling the first toggle

When time comes and you need to test it in an environment, or locally, a super simple implementation can be added.

see 1-enabling-the-first-toggl.ts

Making it possible to run it like this:

TOGGLES=v2 deno run ./1-enabling-the-first-toggl.ts

Or by adding the TOGGLES environment variable to the environment on the server.

Advancing

As the project grows, you can add more toggles, and more complexity to the isEnabled function.

see 3-advancing.ts

deno run ./3-advancing.ts

Releases

No releases published

Packages

No packages published