1. 16
    Extract Environment Variables to a .env File in a JavaScript Project
    25s

Extract Environment Variables to a .env File in a JavaScript Project

Colby Fayock
InstructorColby Fayock
Share this video with your friends

Social Share Links

Send Tweet

Here is a simple lesson where we are going to be adding a couple more environment variables to our .env file.

Click here for exercise instructions

Colby Fayock: [0:00] Now that we have our tileLayer endpoint, we can also add our account ID and our style ID into environment variables. Similar to our API key, we can grab it right from the process.

[0:08] First, let's copy our account name, and let's update our existing ID to that value. We can also add our style ID to our style-id variable. Similar to the API key, we're going to create a variable where we can add our user ID, and we'll do the same thing for our style ID. After we save, we can spin back up our development server, and we can see that it still works.