In this video, learn how to import the core modules. If you have installed Node.js, then you have already installed the core modules. You can use them with the require function. The require function is a part of the CommonJS module pattern. Also in this video, learn how to install the path module, the util module, and the v8 module.
- [Instructor] In the last chapter, … we took a look at the objects and functions … that are globally available to you. … One of those functions that is globally available to you, … if the require function. … And we used it in the last chapter to load the path module. … Let's do that again. … Let's go ahead into our exercise files … and create a new file called core.js. … And within this core.js, … I'm going to create a variable called path … and require a path module. … The require function is what we use to load modules. … Now many of the modules that we load and work … with are hosted on NPM and delivered by the community. … We'll talk more about NPM and those modules later … in the next course. … For now, what we're going to focus on in this chapter … and the next few chapters are those node modules … that you don't have to install with NPM. … These are the modules that are installed locally … with your installation of Node.js … and we refer to them as the core modules. … The path module is a core module …
- What is Node.js?
- Installing Node.js
- The global object
- Importing the core modules
- Creating custom events with the EventEmitter
- Reading, writing, and removing files
- Working with file streams
- Creating child processes with the exec and spawn functions
Skill Level Intermediate
Building RESTful Web APIs with Node.js and Expresswith Emmanuel Henri1h 40m Intermediate
Node.js: Real-Time Web with Socket.IOwith Emmanuel Henri1h 24m Intermediate
1. What Is Node.js?
2. Set Up Your Environnment
3. Node Globals
4. Node Modules
5. File System Basics
6. Files and Streams
- 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.