node.js Flashcards
What is Node.js?
Node.js is a program that allows JavaScript to be run outside of a web browser. 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 can Node.js be used for?
Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
Event-driven means that the server only reacts when an event occurs. This allow us to create high performance, highly scalable, “real-time” applications.
What is a REPL?
read-eval-print-loop. 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?
2009
What back end languages have you heard of?
Python, Ruby, Java
What is a computer process?
the instance of a computer program that is being executed by one or many threads. While a computer program is a passive collection of instructions, a process is the actual execution of those instructions.
Roughly how many computer processes are running on your host operating system (Task Manager or Activity Monitor)?
150
Why should a full stack Web developer know that computer processes exist?
full-stack development is based on making multiple processes work together
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?
process
What is the data type of process.argv in Node.js?
array
What is a JavaScript module?
an individuall js file
What values are passed into a Node.js module’s local scope?
The values passed in the module wrapper: exports, require, module, __filename, __dirname
Give two examples of truly global variables in a Node.js program.
global and process
What is the purpose of module.exports in a Node.js module?
export code from a file to allow use in a different file