A note about feature flags: using env vars means that you're missing a very big aspect of feature flags IMO - the ability to release features without building and deploying a new version. If you have a mechanism that allows you to enable feature flags at runtime, you can do things like a/b testing, gradually releasing a feature and in essence you are separating the "feature release" from the application deployment, which can help it become a product decision instead of a technical one.
For example, if you have to coordinate a feature release with a PR announcement, this can help you turn on a feature without the need for deployment.
There are several tools that can help you achieve this:
Tweek is an open source tool (disclaimer: I work at Soluto which developed it) github.com/Soluto/tweek
Hey Oded, this post was meant to demonstrate a very light-weight solution for feature flags. I agree they're not nearly as flexible as using runtime feature flags, but they also introduce downsides like having to pay for a service or hosting your own. This is totally worth it if you're building a (complex) web app though. By the way, with Netlify it's completely possible to do A/B testing by using feature flags in env variables :)
Didn't know about A/B testing env vars with Netlify, very cool! I'll check it out.
Firebase has a free tier if I'm not mistaken and I think AWS also has something. The integration effort is very small and it's worth it even for simpler apps IMO.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great article!
A note about feature flags: using env vars means that you're missing a very big aspect of feature flags IMO - the ability to release features without building and deploying a new version. If you have a mechanism that allows you to enable feature flags at runtime, you can do things like a/b testing, gradually releasing a feature and in essence you are separating the "feature release" from the application deployment, which can help it become a product decision instead of a technical one.
For example, if you have to coordinate a feature release with a PR announcement, this can help you turn on a feature without the need for deployment.
There are several tools that can help you achieve this:
Thank you for the article!
Hey Oded, this post was meant to demonstrate a very light-weight solution for feature flags. I agree they're not nearly as flexible as using runtime feature flags, but they also introduce downsides like having to pay for a service or hosting your own. This is totally worth it if you're building a (complex) web app though. By the way, with Netlify it's completely possible to do A/B testing by using feature flags in env variables :)
Didn't know about A/B testing env vars with Netlify, very cool! I'll check it out.
Firebase has a free tier if I'm not mistaken and I think AWS also has something. The integration effort is very small and it's worth it even for simpler apps IMO.