Node.js, React, Express, SQL, PostgreSQL Flashcards
(94 cards)
What is Node.js?
an open-source, back-end JavaScript runtime environment that runs on the V8 engine and executes JavaScript code outside a web browser
What can Node.js be used for?
lets developers use JavaScript to write command line tools and server-side scripting
basically - lets you use javaScript everywhere - not just within the browser
What is a REPL?
Read-eval-print loop
also termed an interactive toplevel or language shell
a simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user
executed piecewise
When was Node.js created?
May 27, 2009
What back end languages have you heard of?
java python ruby php C++ C#
What is a computer process?
A process that 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?
521
Why should a full stack web developer know that computer processes exist?
bc Full Stack Web development is based on making multiple processes work together to form one application
What is the process object in a Node.js program?
The process object is a global that provides information about, and control over, the current Node.js process.
How do you access the process object in a Node.js program?
global - always available to Node.js applications
What is the data type of process.argv in Node.js?
an array of strings
What is a JavaScript Module?
a single .js file
What values are passed into a Node.js module’s local scope?
module & exports objects
convenience variables: __filename and __dirname
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?
they tell Node.js which bits of code to export from one file so they can be accessed in another
How do you import functionality into a Node.js module from another Node.js module?
export it from the module with module.exports or exports and use require() in the module you want to use it in.
What is a directory?
a collection of files
also known as a ‘folder’
What is a relative file path?
location that is relative to the current directory
What is an absolute file path?
full URL or file path from the root to a file
starts with ‘/’
What module does Node.js include for manipulating the file system?
fs module
What method is available in the Node.js fs module for writing data to a file?
fs.writeFile
Are file operations using the fs module synchronous or asynchronous?
asynchronous
How do you add express to your package dependencies?
npm i express within directory containing json.package
What express application method starts the server and binds it to a network port?
listen()