Node.js Flashcards
What is Node.js?
Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on the V8 engine and executes JavaScript code outside a web browser.
What can Node.js be used for?
Node.js is primarily used for non-blocking, event-driven servers, due to its single-threaded nature. It’s used for traditional web sites and back-end API services, but was designed with real-time, push-based architectures in mind.
What is a REPL?
provides a Read-Eval-Print-Loop (REPL) implementation that is available both as a standalone program or includible in other applications.
When was Node.js created?
May 27, 2009
What back end languages have you heard of?
python, c, c++, java, ruby, php
What is a computer process?
a process is the instance of a computer program that is being executed by one or many threads. It contains the program code and its activity.
Why should a full stack Web developer know that computer processes exist?
Full stack Web development is based on making multiple processes work together to form one application, so having at least a cursory awareness of computer processes is necessary
What is the process object in a Node.js program?
The process object is a global that provides information about, and control over, the current Node.js process.
How do you access the process object in a Node.js program?
As a global, it is always available to Node.js applications without using require(). It can also be explicitly accessed using require(): const process = require('process');
What is the data type of process.argv in Node.js?
array
What is a JavaScript module?
In the Node.js module system, each file is treated as a separate module.
What values are passed into a Node.js module’s local scope?
__dirname, __filname, exports, module, require()
Give two examples of truly global variables in a Node.js program.
console, process
What is the purpose of module.exports in a Node.js module?
Module exports are the instruction that tells Node.js which bits of code (functions, objects, strings, etc.) to “export” from a given file so other files are allowed to access the exported code.
How do you import functionality into a Node.js module from another Node.js module?
require