Node dotenv and Environment Variables

preview_player
Показать описание
Learn to use dotenv and environment variables to configure a node application.

💻 My Software 💻

📚 My Courses 📚

👩‍💻 Download Code 👨‍💻

⌛ Timestamps ⌛
0:00 - Introduction
0:10 - What are Environment Variables?
0:54 - Purpose of Environment Variables
1:32 - Environment Variables and Node
3:02 - Providing Environment Variables Directly
3:59 - Providing Environment Variables with Configuration Variables
4:42 - What is a .env File?
5:47 - .env File Security
6:29 - What is dotenv?
7:52 - Accessing Environment Variables with dotenv
8:52 - Multiple .env files with dotenv
10:53 - Outro
Рекомендации по теме
Комментарии
Автор

Another amazing explanation of a difficult subject!

kathrynwittmann
Автор

After going through several videos, I finally found one that makes perfect sense. Thanks man

keifer
Автор

Very good! Just one thing, in case someone else gets the same problem than me, using ES6 the way to import is a little different, you should use import 'dotenv/config'

diegofilastro
Автор

Superb explanaton. He broke down concepts I've been struggling to understand like he was teaching a 5 year old

chisomedoka
Автор

Thank you very much for such a comprehensive explaination - now I got the hang of it, finally - Thanks a lot man, really great video.

clickadelic
Автор

IF YOU USE TYPE "module", then you need to use 'import', not 'require'. Setting type as module in meta-data is changing file to ES6 system. ES6 uses import, leaving type as blank ("") sets it's system as common JS file (.cjs)

pawe
Автор

It's exactly what I for. Great job! Thanks master!

lovepeace
Автор

Thank you so much Sir! for your help. Really helped me a lot was stuck on a bug for days

johnsimon
Автор

this was very well explained, than you!

vacekto
Автор

@10:44 how can we print just the regular env file content instead of "development" or "production"?

Also, say that you want all the variables of your env file imported into another env file, is it possible to do this? If not, can we import two env files into our index file?

Thank you for this video.

bonsayeb
Автор

Can you explain pass a specific .env file in npm scripts in package.json

ashishgupta