Node.js Flashcards
What is Node.js?
Node.js is a program that allows JavaScript to be run outside of a web browser.
What can Node.js be used for?
It is commonly used to build back ends for Web applications, command-line programs, or any kind of automation that developers wish to perform.
What is a REPL?
also termed an interactive toplevel or language shell, is a simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user
When was Node.js created?
May 27, 2009
What back end languages have you heard of?
Python, Java, JavaScript, Ruby, C#, and PHP
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)?
hundreds
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. This will be extremely important when learning about applications made of multiple components, such as clients, servers, and databases.
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?
1.console.log(process)
2. node process.js
(just type ‘process’)
What is the data type of process.argv in Node.js?
array of strings
What is a JavaScript module?
In JavaScript, a “module” is a single .js file (functions and variables that can be exported)
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.
global, process, console,
What is the purpose of module.exports in a Node.js module?
way to expose things in one module so they’re available in another