Viewers: in countries Watching now:
- Why use Node.js?
- Installing Node.js
- Understanding the event loop
- Initializing Node.js projects
- Creating modules with getters and setters
- Starting Express applications
- Testing your code
- Working with sessions and databases
- Building command-line tools
- Emitting events and attaching listeners
- Controlling readable streams
So to do that, I'm just going to type in Node and then Return. Let's start doing some comparisons. There are a few variables that you may be familiar with from the web browser. There's window, location, and document. The window object has functions and attributes that have to do with the window that's being drawn on the screen. And similarly, the location object has all the information about the URL that we've loaded. And then finally, there's a document object. This document object contains all of the HTML that's being displayed on the page.
We can navigate the HTML by expanding the HTML elements. Now let's try evaluating these objects in node. First I'm going to type window, and then node says that window is not defined. Let's try location. Location is also not defined. Okay, finally let's just try document. Document is also not defined. So all three of these objects that you may be familiar with from Google Chrome, are not going to be available in Node. That's because all of these objects have to do with a specific HTML page being drawn in a specific window.
None of that is applicable in Node. Now let's take a look at another object. In Google Chrome, type global. Now, depending on what page you're on, you're either going to get a reference error saying that global is not defined, or you're going to get an instance of a window object. That window object is going to be similar to the one that you get when you just type in window. On the other hand, when you go over to Node, type in global, and you get an entire object. This object has several functions that are not avalable in Google Chrome.
Find answers to the most frequently asked questions about Node.js Essential Training .
Here are the FAQs that matched your search "" :
- Q: How can I install the new version of the Express command-line tool?
- A: Newer versions of the Express command-line tool can be installed using the command "npm install -g express-generator." But before doing this, you should first remove any older version of the module, using the command "npm uninstall -g express."
Sorry, there are no matches for your search "" —to search again, type in another word or phrase and click search.