|
|
|
|
|
by jaredsohn
1533 days ago
|
|
The easiest way to do it is to create environment variables and check against them in code. This allows turning on / off functionality globally. Systems like AWS and Heroku allow toggling them without redeploying. You can also create features that apply to individual users or if enterprise then to all users in the customer. This can be done by creating some boolean fields in the database (using a single feature_flags json field is recommended because then you don't have to change the schema every time a new feature flag is added.) And then in code you check against the environment variable or against the user / customer before running changed functionality via a simple if statement. |
|