That's a great question. Certainly, but it depends on your framework and toolset. Personally, I haven't stumbled upon any .env files in .NET projects -- but conceptionally, both environment files and the method I show in my article (by swapping out / injecting classes) are pretty much equal in the end.
Worth noting: Some modern .NET projects solve this issue by utilizing app settings and user secrets. I'm sure other programming languages offer similar solutions.
That's a great question. Certainly, but it depends on your framework and toolset. Personally, I haven't stumbled upon any
.env
files in .NET projects -- but conceptionally, both environment files and the method I show in my article (by swapping out / injecting classes) are pretty much equal in the end.Worth noting: Some modern .NET projects solve this issue by utilizing app settings and user secrets. I'm sure other programming languages offer similar solutions.
Oh yes the
.env
files were used in my react projects.Yeah, thatβs the recommended way of doing it in React projects if I recall correctly. π