The Node.js runtime powers back-end servers for big players like PayPal, Netflix, LinkedIn, and even NASA. This course will teach you the fundamentals of this very popular runtime and get you comfortable writing code for Node.
Samer Buna is a polyglot coder with years of practical experience in designing, implementing, and testing software, including web and mobile applications development, API design, functional programming, optimization, system administration, databases, and scalability. Samer worked in several industries including real estate, government, education, and publications
Modules and Concurrency In this module, we're going to talk about two of the core fundamentals of Node. Its modules system, and how to define and require modules using the exports and require objects. And we'll also talk about how Node handles slow operations and allow the execution of many things at once without using any threads, which is a big deal. Let's start with the simple module system and talk about the three important keywords here, the module keyword, the exports keyword, and the require keyword.
Working with the Operating System One of the common tasks in any backend program is to work with the operation system resources. Read information from the OS and write information to it as well. Node has a few built-in modules that provide some core features around these tasks. There is the OS module for general communication with the OS, and the FS module, which is specific to reading and writing to the OS file system. And there is also the child_processes module that enables you to run any operating system command from within Node. Let's talk about all these three handy modules.