And now we've got the environment variable for API_BASE. > Burke Holland: And an unnecessary semi-colon. So we said, API_BASE, I think is what we called it. And I'm gonna say, env, and here I can pass in any environment variable. How do we do that? We can do it with the debugger. And then whichever variables you create will be there. > Burke Holland: So if you're not familiar with node environment variables, just know that when you create them or when you pass them in, they're on the process.env object. Let me make sure my Typescript watch is still running over here. Okay, so we're gonna pass in a variable to this application called API_BASE. And let's say that we're gonna put it in a variable called, In this case let's go ahead and pull this line out. Because basically what you have to do is you have to call node, run your application and pass in the appropriate variables.
#Visual studio code environment variable code
Now node environment variables are cool but they're a little bit tricky to work with and VS Code makes it a little bit easier to pass those into the node process. In the case of node, that's environment variables. So what do we do? We put them in application settings. Because you may need to change them later. Now, normally when you write an application, you don't hard code things like these. Here we have an index file and our index file has a variable at the top that contains our API. > Burke Holland: Something else that we can do with launch configs, other ways you can use them. Transcript from the "Environment Variables" Lesson