Using Environmental Variables in NodeJS with DotEnv

Veröffentlicht am: 17 Mai 2022
auf dem Kanal: Code Ethically With Eric
38
3

Today, I'm going to show you how to hide secret keys and information in JavaScript using the JavaScript library called dotenv - which is used to access environment variables in a NodeJS project.

We will start a project, download the library, import the library, create some code, set up the .env file and create some variables, then run the code to call the variables in the main file.

Then we will be creating a more realistic example with the npm library opener to open a website url hidden as an environment variable.

So let's start!

My Links:
Project Repo - https://github.com/cireneirbo/demo-do...
My GitHub - https://github.com/cireneirbo

Video Content Links:
dotenv - https://www.npmjs.com/package/dotenv
opener - https://www.npmjs.com/package/opener
NodeJS - https://nodejs.org/en/
CC music - https://www.youtube.com/watch?v=daEB_...

#node #nodejs #environmentalvariables #secretkeys #secrets #javascript #js #programming #tutorial


Auf dieser Seite können Sie das Online-Video Using Environmental Variables in NodeJS with DotEnv mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Code Ethically With Eric 17 Mai 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 38 Mal angesehen und es wurde von 3 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!