How to Create and Use Environment Variables and the .env file in JavaScript in 7 Minutes

preview_player
Показать описание
Environment variables are variables that allow you to hide information or data that you wouldn't want embedded directly in your application code. The most common way to use environment variables is with the .env file.

Timestamps:

0:00 What are Environment Variables?
0:41 How to Create Environment Variables in the Terminal
2:15 What is the .env file?
3:12 How to use Environment Variables in a Project
4:28 dotenv npm package
5:12 Why use Environment Variables and .env files?

== Let's Connect ==

== Who I Am ==
I'm Ijemma, a frontend software engineer currently working in New York City. I make videos on all things JavaScript and, more broadly, frontend web development.

#javascript #webdevelopment #softwareengineer
Рекомендации по теме
Комментарии
Автор

underrated video and channel! Just shared this video on Twitter. Thank you!

Jhn.R
Автор

This video is so underrated. Literally covered everything about environment variables. You got a new subscriber here.

nischalneupane
Автор

Superb topic Coverage. I couldn't help but notice that you talk like Marques Brownlee.

divineokafor-udah
Автор

Thank you so much. This is the best teaching on environmental variables so far

nwobodogeorge
Автор

Thanks so much! I tried three other videos before this and yours was the most helpful :)

sapettee
Автор

I like the approach, both explaining and doing the extra editing work of showing visually. THIS is what makes the difference, at least for me. Im subbing :)

thomasworkersen
Автор

Uncaught syntaxError: cannot use import outside a module

Prixzlex
Автор

To be clear, if I push a project to GitHub and ignore the .env the .env file info will still be available for my page or, now that information will no longer be accessible through the git repo in terms of someone loading the app? Basically if I need an api for a map and it lives in the .env file, the api won't be accessible to the person trying to access the project from GitHub?

dykeflwr
Автор

Great channel, well-explained concepts. Glad I found this. Thanks @Ijemma

opeyemioyelesi
Автор

How can we use .env file only with html, css and javascript without node.

Or

How can we hide our variable names or links in javascript?

ankitshsharma
Автор

Good tutorial, but I got a doubt, I'd like to know how to hide environment variables in a Vanilla JS project, cause I used dotenv but it doesn't work, do I need anything else?

germanzabala
Автор

you don't need this for backend right? this is just mimicking backend stuff on browser console?

alext
join shbcf.ru