Skip to content

Add feature flags #214

@roobottom

Description

@roobottom

In the MYA prototype, we have a flags system that allows any user to turn prototype features on or off. This is especially useful when testing different variants, such as different content or different journeys.

We can set a flag (currently limited to bools) via

  • env variables
  • via GET, through query string parameters, e.g., ?feature_name=true&feature_othername=off (on/off and true/false supported)
  • via POST through a form
  • a defaults.js file

Variables are persisted in the session and are available via

  • session.data.features[var_name]
  • req.features[var_name] for routing

Might this be useful for others?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions