Node.js Flashcards
What is Node.js?
Javascript not in a browser
What can Node.js be used for?
To build backends
What is a REPL?
A shortcut for read, eval, print, loop
Ie:
Google dev tools
When was Node.js created?
In 2009 by Ryan Dahl
What back end languages have you heard of?
Python, C++, Java, C, Ruby, Perl
What is a computer process?
An instance of a program that is being executed
Roughly how many computer processes are running on your host operating system (Task Manager or Activity Monitor)?
100s or more
Why should a full stack Web developer know that computer processes exist?
So they know how much memory their app takes and the relationship between front end and backend
What is the process object in a Node.js program?
A JavaScript object in Node that is a model of the computers Node.js that is currently running
(Similar to browser Window object)
How do you access the process object in a Node.js program?
Just “process” because it’s global
What is the data type of process.argv in Node.js?
An array of strings
What is a JavaScript module?
A way to separate applications into different files
What values are passed into a Node.js module’s local scope?
Dirname, filename, require, module, exports
Give two examples of truly global variables in a Node.js program
Process + URL
What is the purpose of module.exports in a Node.js module?
It allows variables from other modules to be used