Node.js Flashcards
What is Node.js?
built on chrome’s JavaScript runtime for building fast and scalable network applications. uses event-driven non-blocking I/O model. JavaScript without the browser
What can Node.js be used for?
you can do anything with networking with it, though not suggested for 3d graphics, can only be back-end
What is a REPL?
read-eval-print loop, interactive toplevel or language shell. Takes single user inputs, executers them, and returns the result to the user, and is executed piecewise. Ex. console
When was Node.js created?
May 27, 2009
What back end languages have you heard of?
ruby, python, php, sql (a database for languages), java, JavaScript
What is a computer process?
a process contains a program code and its activity, it is executers in one or many threads.
Roughly how many computer processes are running on your host operating system (Task Manager or Activity Monitor)?
Currently I have 226
Why should a full stack Web Developer know that computer processes exist?
A full stack web developer helps make multiple processes work together to form one application, so knowing about computer processes is important, especially since we’re using clients, servers, and databases
How do you access the process object in the Node.js program?
node and the node command process, cause it’s global
What is the data type of process.argv in Node.js?
array of strings
What is a JavaScript module?
a file containing related code, used to be called scripts
What values are passed into a Node.js module’s local scope?
exports, module, __filename, __dirname, require
Give two examples of truly global variables in a Node.js program.
None of them are truly global, but __filename, __dirname, exports, module, and require are global in the scope of modules
Give two examples of truly global variables in a Node.js program.
None of them are truly global, but __filename, __dirname, exports, module, and require are global in the scope of modules. console & process are truly global
What is the purpose of module.exports in a Node.js module?
export a file to another file