Node.js Flashcards
What is Node.js?
allows you to do js outside of the browser
What can Node.js be used for?
build and launch apps from your computer
What is a REPL?
read eval print loop that allows you to input commands, execute them, and return results
When was Node.js created?
2009?
What back end languages have you heard of?
C++ python C ruby go javascript java
What is a computer process?
it is an 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?
6 apps running, 132 background processes
Why should a full stack web developer know that computer processes exist?
know what sort of burden you are putting on a computer with your app
What is the process object in a Node.js program?
The projcess 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?
You can access it by using console logging it or you can access it’s children by index
it is global so you can access it whenever
What is the data type of process.argv in Node.js?
array of strings
What is a JS module?
a simple part of a more complex, larger system
a file within many files for js
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 console
What is the purpose of module.exports in a Node.js module?
move code between files