Skip to content

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

About

This is a node / express app that demonstrates using feature flags via environment variables.

Prerequisites

Setup

Environment variables

You can set environment variables using .env file.

To start you can copy the example file as follows:

cp .env.example .env

You can also just export environment variables

export ENABLE_FEATURE_<NAME>=true

Modules

Install the node modules:

npm install

Toggling features

There are two features that can be toggled on and off by setting its corresponding environment variable:

FeatureEnvironment variable name
unicornENABLE_FEATURE_UNICORN
dragonENABLE_FEATURE_DRAGON

To toggle the feature on or off set the variable to true or false and then restart the service.

Running the service

Start the service with:

npm start

Then you can open the site in your browser at: http://localhost:3000

About

Example node app for feature flags

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages