Scott spends a couple of minutes talking about Node.js environment variables. All environment variables are stored on a global process.env variable. One important variable is the process.env.NODE_ENV, which determines if an application is running in a production or test environment.
- So, small little note.…Now that we're talking about tests,…it's worth mentioning,…god, suspect typo,…it's worth mentioning envaironment variables.…Environment variables, sorry,…I said envaironment variables,…I was reading the typo.…(laughs)…Environment variables.…And how we can use them.…There exists a process.env object globally in Node.…So I'll show you what that looks like.…So, again, going back to how Node handles files.…I'm just going to comment this stuff out real quick…so you can see.…
So, again, there's a IIFE around this entire file, right?…Everybody knows what it means when I say IIFE?…Immediately-Invoked Functional Expression.…So there's a IIFE here that's created a closure.…And, again, we get console,…we get all this other stuff, right?…And then there's also process,…that's another one.…There's so many args up here.…So process is the actual process that you're running in.…So what we can do is we can look at that process.…And I'm just going to show you what it looks like.…(keyboard clicking)…So if I just do that,…
This course was created by Frontend Masters. It was originally released on 12/30/2015. We're pleased to host this training in our library.
- Executing Node.js
- Using Express
- What is middleware?
- Testing in Node.js
- Using Mongo with Node.js
- Data modeling
- Querying data with Mongoose
- Identifying sensitive routes
- Configuring the deployment
Skill Level Intermediate
Node.js: Build Your First Microservicewith Daniel Khan2h 9m Intermediate
Building APIs Using Hapi in Node.jswith Kirsten Hunter2h 23m Intermediate
Node.js: Extend and Maintain Applicationswith Daniel Khan3h 35m Intermediate
2. REST APIs
5. Organization and Configuration
7. Data Modeling
10. Securing Routes
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.