Node Flashcards
What is Node.js?
-Asynchronous event-driven JavaScript runtime
What can Node.js be used for?
-Build scalable network applications
What is a REPL?
-Read-eval-print loop
When was Node.js created?
-Node.js was initially released on May 27, 2009
What back end languages have you heard of?
-C, C++, Java, Ruby, PHP, Python
What is a computer process?
-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)?
-120
Why should a full stack Web developer know that computer processes exist?
-Full stack development is based on making multiple processes work together to form one appliation
What is the process object in a Node.js program?
-global that provides information about, and control over, the currnet Node.js process
How do you access the process object in a Node.js program?
-process.argv
What is the data type of process.argv in Node.js?
-array
What is a JavaScript module?
-Each js file is treated as a module
What values are passed into a Node.js module’s local scope?
- __dirname
- __filename
- exports
- module
- require()
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?
-Tells Node.js which bits of code to export from a given file so other modules have access to the exported code