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 ....

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay