- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
How to access environment variables in NodeJS by adding .env file
In this video we're gonna learn how to add .env file and access environment variables in NodeJS project.
In real world projects we cannot put all our sensitive information like Database credentials, API tokens ..etc. in our code plain hardcoded. So, we use Environment variables for that. We define all our Environment related variables in a separate file: we call it .env file and we have different .env files for different environments.
So, in this video we have simple NodeJS project written with TypeScript and we're gonna add a .env file and put some values there (Port, Environment ..etc.) and access them in the code.
00:00 Intro
00:24 Why we use .env files
01:37 Add .env files to our existing project
02:54 Install dotenv package
08:33 Outro
Create a REST API with NodeJS:
https://www.youtube.com/playlist?list=PLG3j59vX4yLHA-wCw7KDP-i0r10ZrckqG
Hit Subscribe and smash the Like button.
Become a Patreon and support me!
https://www.patreon.com/coderaweso_me
Visit my blog: http://coderaweso.me
Follow me on Tiktok: https://www.tiktok.com/@coderaweso.me
Follow me on Instagram : https://www.instagram.com/coderaweso.me
Like me on Facebook : https://www.facebook.com/coderaweso.me
Follow me on Twitter : https://twitter.com/coderaweso_me
Видео How to access environment variables in NodeJS by adding .env file канала coder awesome
In real world projects we cannot put all our sensitive information like Database credentials, API tokens ..etc. in our code plain hardcoded. So, we use Environment variables for that. We define all our Environment related variables in a separate file: we call it .env file and we have different .env files for different environments.
So, in this video we have simple NodeJS project written with TypeScript and we're gonna add a .env file and put some values there (Port, Environment ..etc.) and access them in the code.
00:00 Intro
00:24 Why we use .env files
01:37 Add .env files to our existing project
02:54 Install dotenv package
08:33 Outro
Create a REST API with NodeJS:
https://www.youtube.com/playlist?list=PLG3j59vX4yLHA-wCw7KDP-i0r10ZrckqG
Hit Subscribe and smash the Like button.
Become a Patreon and support me!
https://www.patreon.com/coderaweso_me
Visit my blog: http://coderaweso.me
Follow me on Tiktok: https://www.tiktok.com/@coderaweso.me
Follow me on Instagram : https://www.instagram.com/coderaweso.me
Like me on Facebook : https://www.facebook.com/coderaweso.me
Follow me on Twitter : https://twitter.com/coderaweso_me
Видео How to access environment variables in NodeJS by adding .env file канала coder awesome
access environment variables in nodejs access enviorment variables in nodejs add .env file to nodejs project .env file with nodejs typescript access port number from .env file .env config vars dotenv dotenv environment variables dotenv node env file setup env vars environment variables express js env file express js env variable express js environment variable node node dotenv node environment variables nodejs nodejs env file nodejs environment variable
Комментарии отсутствуют
Информация о видео
1 декабря 2023 г. 17:36:09
00:08:46
Другие видео канала




















