Node Flashcards
What is Node.js?
a backend JavaScript based language program that is designed to build scalable network applications
What can Node.js be used for?
can be used for pretty much anything, but is mainly used as web servers and command-lines
it can only be used for back-end
What is a REPL?
read–eval–print loop
is a simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user; a program written in a REPL environment is executed piecewise
When was Node.js created?
May 27, 2009
What is a computer process?
an instance where a computer program’s code is being executed
Roughly how many computer processes are running on your host operating system (Task Manager or Activity Monitor)?
alot
Why should a full stack Web developer know that computer processes exist?
Computer processes occur all the time while we are using applications
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?
put console.log(process) in a .js document and access that document on the command-line with the node command
What is the data type of process.argv in Node.js?
array of strings
What is a JavaScript module?
the module is an object and represents each JavaScript file it may seem like a global object, but it is just an object locale to each file
What values are passed into a Node.js module’s local scope?
module, exports, require, __filename, __dirname
Give two examples of truly global variables in a Node.js program.
Object, undefined
What is the purpose of module.exports in a Node.js module?
to have other modules use the .export from that file
How do you import functionality into a Node.js module from another Node.js module?
require()