Node.js Flashcards
What is Node.js?
Javascript engine that allows you to run Javascript outside of the browser
What can Node.js be used for?
Used to build network applications (like a server) but also any applications (NASA rover programmed with Node)
What is a REPL?
Read-eval-print loop
A simple interactive programming environment that takes single user inputs, executes them, and returns the result to the user. Basically a little playground environment to learn and test things
When was Node.js created?
2009
What back end languages have you heard of?
PHP, Python, C++, GoLang
What is a computer process?
The instance of a computer program that is being executed by one of many threads. A process contains the program code and its activity.
Why should a full stack Web developer know that computer processes exist?
Our websites, apps, and/or servers will have more than one process occurring so we should know enough about processes to make our projects work correctly.
What is the process object in a Node.js program?
Gives information on whatever the current process running in Node.js is
How do you access the process object in a Node.js program?
Using process
What is the data type of process.argv in Node.js?
Array
What is a JavaScript module?
A single .js file
What values are passed into a Node.js module’s local scope?
Require, exports, module, _dirname, and _filename
Give two examples of truly global variables in a Node.js program.
Process and console
What is the purpose of module.exports in a Node.js module?
To be able to use methods/variables in other JS files
How do you import functionality into a Node.js module from another Node.js module?
When you write the export on the first file you make a variable on the second file that calls the file path with require.