Node Flashcards
What is Node.js?
JavaScript that can run outside the browser
What can Node.js be used for?
To use JS on back-end (server-side)
command line
What is a REPL?
Read Eval Print Loop
Read what you want to type, evaluate it, print result, do it again
What is a computer process?
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?
A lot
Why should a full stack Web Developer know that computer processes exist?
full stack web dev relies on making multiple processes work together to form an app. Need to be aware of what processes are in order to understand the multiple components of full stack web dev (clients, servers, databases)
What is the process object in a Node.js program?
global object that provides info about and control over the current Node.js process
How do you access the process object in a Node.js program?
It’s always available in Node
What is the data type of process.argv in Node.js?
An array of strings
What is a JavaScript module?
In Node.js, each js file is considered a separate module
What values are passed into a Node.js module’s local scope?
exports, require, module, __filename, __dirname
Give two examples of truly global variables in a Node.js program
process
global
What is the purpose of module.exports in a Node.js module?
can assign functionality you want to return from the module
How do you import functionality into a Node.js module from another Node.js module?
require( )
What module does Node.js include for manipulating the file system?
fs (File System module)