Node Flashcards
What are the 3 components of a fullstack Web architecture?
Front-end server, application server, back-end server.
What is Node.js?
Node.js is a back-end JavaScript runtime environment
What can Node.js be used for?
back-end
What is a REPL?
Read-Eval-Print-Loop (REPL) is an easy-to-use command-line tool, used for processing Node. js expressions
When was Node.js created?
May 27, 2009
What backend languages have you heard of?
Python, PHP, Ruby, Java, C++
What is a computer process?
a process is the instance of a computer program that is being executed by one or many threads.
Roughly how many computer processes are running on your host operating system (Task Manager or Activity Monitor)?
100+
Why should a full stack Web developer know that computer processes exist?
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. As a global, it is always available to Node.js applications without using require(). It can also be explicitly accessed using require():
How do you access the process object in a Node.js program?
console.log(process)
What is the data type of process.argv in Node.js?
an Array of strings
How do you access the command line arguments in a Node.js program?
What is a JavaScript module?
What are the advantages of modular programming?
In JavaScript, how do you make a function in a module available to other modules?
export keyword
In JavaScript, how do you use a function from another module?
import keyword.
What is the JavaScript Event Loop?
What is different between “blocking” and “non-blocking” with respect to how code is executed?
Blocking refers to operations that block further execution until that operation finishes while non-blocking refers to code that doesn’t block execution. Or as Node. js docs puts it, blocking is when the execution of additional JavaScript in the Node. js process must wait until a non-JavaScript operation completes.
What is a directory?
a folder/container that holds files.
What is a relative file path?
a file in the same directory
What is an absolute file path?
always starts at the root of the file path.
What module does Node.js include for manipulating the file system?
fs-module
What method is available in the node:fs module for reading data from a file?
readFile(FILEPATH, OPTION)