Advanced
Environments
Featurevisor is highly configurable and allows you to have any number of custom environments (like development, staging, and production). You can also choose to have no environments at all.
Custom environments#
It is recommended that you have at least staging and production environments in your project. You can add more environments as needed:
featurevisor.config.js
module.exports = { tags: [ 'web', 'mobile' ], environments: [ 'staging', 'production', // add more environments here... ],}Above configuration will help you define your features against each environment as follows:
features/my_feature.yml
description: My featuretags: - webbucketBy: userId# rules per each environmentrules: staging: - key: everyone segments: '*' percentage: 100 production: - key: everyone segments: '*' percentage: 0And the datafiles will be built per each environment:
$ tree datafiles.├── staging/│ ├── featurevisor-tag-web.json│ └── featurevisor-tag-mobile.json├── production/│ ├── featurevisor-tag-web.json│ └── featurevisor-tag-mobile.jsonNo environments#
You can also choose to have no environments at all:
featurevisor.config.js
module.exports = { tags: [ 'web', 'mobile' ], environments: false,}This will allow you to define your rollout rules directly:
features/my_feature.yml
description: My featuretags: - webbucketBy: userId# rules without needing environment specific keysrules: - key: everyone segments: '*' percentage: 100The datafiles will be built without any environment:
$ tree datafiles.├── featurevisor-tag-web.json├── featurevisor-tag-mobile.json
