HTTPS/Node/Express Flashcards
What is a client?
Service REQUESTERS are clients (users?) - something that is CONSUMING resources
What is a server?
Service PROVIDERS are servers
Which HTTP method does a browser issue to a web server when you visit a URL?
The GET method
What three things are on the start-line of an HTTP request message?
HTTP method (verb like GET, PUT, POST. . . or noun like HEAD or OPTION)
-How is the request being made?
Request Target - usually a URL or absolute path
-Where is the request going?
The HTTP version (defines structure of remaining message)
What three things are on the start-line of an HTTP response message?
The protocol version (usually HTTP/1.1)
The status code - indicates success or failure of request
The status text - brief, informational, textual description of the status code
What are HTTP headers?
Headers are where the client and server can pass additional information with an HTTP request or response.
- General Headers - apply to the message as a whole - Request Headers - modify the request by specifying it further, giving context, or restricting it - Representation Headers - describe the original format of the message data
Where would you go if you wanted to learn more about a specific HTTP Header?
MDN
Is a body required for a valid HTTP request or response message?
A body is not required
What is a CLI?
Command Line Interface
- An interface that receives commands from the user via text
What is a GUI?
Graphical User Interface
- An interface that receives commands from users via graphical icons and audio indicators
Give a use case for the following command:
man
Manual lists information on a command
Give a use case for the following command:
cat
Concatenates files
Give a use case for the following command:
ls
Lists directory contents
Give a use case for the following command:
pwd
Prints the name of the current/working directory
Give a use case for the following command:
echo
Displays a line of text . . . “echoes” the text input
Give a use case for the following command:
touch
Change files timestamps
Give a use case for the following command:
mkdir
Makes directories
Give a use case for the following command:
mv
Moves or renames files
Give a use case for the following command:
rm
Removes files
Give a use case for the following command:
cp
Copies files and/or directories
What are the three virtues of a great programmer?
1) Laziness:
The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful and document what you wrote so you don’t have to answer so many questions about it.
2) Impatience:
The anger you feel when the computer is being lazy. This makes you write programs that don’t just react to your needs, but actually anticipate them. Or at least pretend to.
3) Hubris:
The quality that makes you write (and maintain) programs that other people won’t want to say bad things about.
What is Node.js?
Node.js is a program that allows JavaScript to be run outside of a browser
What can Node.js be used for?
It can be used to build backend Web applications, command-line programs, and automation
What is a REPL?
Read-eval-print loop
- a simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the use