Home / Companies / Infisical / Blog / Post Details
Content Deep Dive

Stop using dotenv in Node.js v20.6.0+

Blog post from Infisical

Post Details
Company
Date Published
Author
Tony Dang
Word Count
333
Language
English
Hacker News Points
-
Summary

I'm excited to say that, with Node.js v20.6.0, we now have built-in support for loading environment variables from .env files, which means you can finally stop using the dotenv package.` `With this release, you can access environment variables in a .env file in your Node.js application without needing to set up any additional configuration or use the dotenv module.` `To start using this feature, simply create a .env file at the root of your application and store environment variables there, then run your application with the --env-file flag included in the start command.