![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
By requiring dot-env into your source, your current working directory is scanned for a .env.json
file to merge into your process.env
runtime variables.
Environment variables are magical. You should store your sensitive credentials in there (perhaps as part of your heroku setup, or your upstart job).
That works well in production, but kindof sucks running locally... until now!
Now I don't have to clutter my .zshrc
file with ENV statements for different projects (that probably overlap with keys).
{
"MONGO_URL": "mongodb://ian:sekret@widmore.mongohq.com:27017/dev_local",
"REDIS_KEY": "1234"
}
// app.js
require('dot-env')
console.log(process.env)
Let's run my application (and override the redis key just for a quick test).
NEW_KEY=value node app.js
This application logs to the console this:
{
MONGO_URL: "mongodb://ian:sekret@widmore.mongohq.com:27017/dev_local",
NEW_KEY: "value",
REDIS_KEY: "1234"
}
Because dot-env should only be run during your bootstrap phase of your application, we're not blocking anything important.
If you send a pull request, perhaps.
The keys naturally in your process.env are not overridden. Variables provided by the .env.json
file only add to your natural process.env
NO! This is meant to make your development environment closer to your prod environment, which means sticking potentially sensitive keys in your env file.
If you want, commit a .env-sample.json just to show developers where they should fill in the blanks of your redacted keys.
MIT
FAQs
An environment variable loader
The npm package dot-env receives a total of 6,417 weekly downloads. As such, dot-env popularity was classified as popular.
We found that dot-env demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.