Awesome work! You’ve learned a lot about some fundamental Node.js concepts and modules. Let’s take a moment to review what we learned:
- REPLs are processes that read, evaluate, print, and repeat (loop), and Node.js comes with its own REPL we can access in our terminal with the
nodefollowed by the file name (if we’re in the same directory) or the absolute path of the file.
- Code can be organized into separate files, modules, and combined through requiring them where needed using the
- Core modules are built into the Node.js environment to efficiently perform common tasks.
consolemodule exports a global
consoleobject provided by web browsers.
processmodule is a global module that gives access to information about the Node.js runtime environment.
osmodule provides methods to retrieve information about the computer, operating system, and network interfaces.
utilmodule contains methods used to maintain and debug your code.
You learned some of the key core modules built into Node.js, but as you know, there are many more. You can even create your own modules, as well as use third-party modules built by other developers. But don’t worry! A good thing to remember when learning Node is that it’s not necessary to memorize every module, method, or other specific aspects of the environment. The best way to get comfortable with Node is to practice making things with it. Your imagination is the limit! So keep going to learn how to download Node on your local machine.
Great work! We’re excited to see what you build!
We’ve required in the core modules you learned about in this lesson. Feel free to use this workspace to practice calling methods from these modules! Some ideas are:
console.count()to log how many times a function is called.
process.emitWarning()to create and log a custom warning message to the terminal.
os.freemem()to check how much free system memory is available in the learning environment.
util.format()to log a formatted object to the terminal.