DEV Community

Ethern Myth
Ethern Myth

Posted on

Env vs AppSettings, Want to keep your Env?

Sometimes you just want to keep your lovely .env file as you were just working on a frontend project that kept your workflow on 🔥. Then it just rains appsettings.json all of a sudden.

But who said we can't try anything to beat the mighty environment. I guess you know why many devs/engineers loves .env files, because they are really easy to use on every project, importantly when going for that testing phase. Even on docker, they seem like air. 😎

Overall, everyone has their likes with both. Env just are more available and used on many platforms, check how integration on platforms like Railway and Render are for docker support. They are great if you get that env file setup right.

To leverage the use of .env files on .NET can be quite difficult to get right, since you might have to get some configurations done separately. But once again 👻, came to the disappearing rescue.

Designed a nuget package that can help you setup that env file quicker and use faster. Even allow dynamic properties to exist.

c-em-env boast with the richness to get the env file fields right at your door step. This just sounded like an AD 🤣

Nonetheless, go to nuget.org and search for c-em-env, might be your luck.

C-EM-ENV

Also available through Github right here:
C-EM-ENV

Versions might differ but it is the same package

All the documentation is available and download is available. Try it now. Few lines of code, create your lovely .env in the project root directory, next have your file read.

If you find any bugs, errors, or anything to add. Do the basics right here! Comment or suggest. More info will be coming soon.

🌊 coming up on the next episode ....

Top comments (0)