Sometimes your project needs access to sensitive information like an access token or database password. Maybe your project needs some configuration...
For further actions, you may consider blocking this person and/or reporting abuse
Thats a super helpful tool! I've created a couple projects that require a .env file and when someone's cloned it, I've had to walk them through what variables were required. This is much more streamlined and simpler. Thanks!
I don't get something here: we do not put
.env
under version control, to avoid leaking secrets, but then you put the data to put into the file into another file to generate it.Why is this not defeating the purpose of not storing this data in version control?
It's instead of copying, renaming, and editing
.env.example
.You don't put sensitive info in the json file, just defaults. When you run
envup
the interactive cli asks you to enter all the values.I got that from the screenshot; it could be explained a little further in the article.
There is a much better way to set environment variables in NodeJS. I've written a detailed post - How I Setup Environment Variables in NodeJS. No, itβs not βdotenvβ
In addition to using environment variables I can recommend the tool github.com/dotenv-linter/dotenv-li... β itβs a lightning-fast linter forΒ .env files. Written in Rust.
Maybe it would be useful for you.
For the fellow PHP'ers out there, here is an amazing .env library. Add two lines to your applications init logic and you're off to the races. github.com/vlucas/phpdotenv
This looks cool! I'll use that in my next project. Can the env.json also be generated from an existing .env file?
Not currently but that could be very useful, I'll add an issue and get round to this at some point!
Just added this to my project, works great!
Thanks :)