Skip to content

catapultcx/feature-flags-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

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:

Feature Environment variable name
unicorn ENABLE_FEATURE_UNICORN
dragon ENABLE_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

Watchers

Forks

Releases

No releases published

Packages

No packages published