Misc Flashcards
What is a CLI?
-command-line interface (Bash, Cmder)
What is a GUI?
-graphical user interface (VS Code, MS Windows/Mac displays)
Give at least one use case for this command:
-man
-man man (prints the manual for manual)
Give at least one use case for this command:
-cat
-cat three-virtues.txt (prints the txt from the txt file)
Give at least one use case for this command:
-ls
-ls (prints the contents of current directory)
Give at least one use case for this command:
-pwd
-pwd (prints the address of your current working directory)
Give at least one use case for this command:
-echo
-echo ‘Hello, World!’ > hello.txt (inserts ‘Hello, World!’ into hello.txt file)
Give at least one use case for this command:
-touch
-touch new-file.txt (creates a new file and updates its timestamp)
Give at least one use case for this command:
-mkdir
-mkdir parent (creates a new directory)
Give at least one use case for this command:
-mv
-mv pokiemans pokemon (renames pokiemans directory to pokemon)
Give at least one use case for this command:
-rm
-rm extraneous.txt (removes extraenous.txt)
Give at least one use case for this command:
-cp
-cp original.txt copyOf.txt (makes a copyOf.txt file from original.txt)
What are some back end languages?
-JavaScript, Python, PHP, Java, Ruby, C, C#, C++, Rust, Perl, Swift, Go
What makes JavaScript unique?
-prototypal inheritance, “this”, event loops, closure
What is a computer process?
-an instance of a computer program that is being executed
What is NPM?
- node package manager
- a software registry where developers can share and borrow packages
- has: website, registry, CLI
What is a package?
- aka a “module”, containing bits of reusable code
- exists as a directory with package + package.json + other files
How can you create a package.json with npm?
- navigate to the root directory of your package
2. “npm init -y” (default package.json) or “npm init” (manually answer prompts)
What is package.json?
- lists the packages your project depends on
- specifies versions of a package that your project can use
- makes your build reproducible, and therefore easier to share with other developers
What is a dependency and how to you add one to a package?
- a package that your package needs in order to work
- add new dependencies by installing them in the root directory of your package “npm install” and adding “–save”
What happens when you add a dependency to a package with npm?
- allows the project to install the versions of the modules it depends on
- by running “npm install”, you can install all of the dependencies that are listed in the project’s package.json
What does “npm init” do?
“npm init” is a command to scaffold out your project
“npm init –yes” will instantly initialize a project with default values
What is on the first line of an HTTP response message?
- The protocol version, usually HTTP/1.1
- A status code, indicating success or failure of the request (200, 404, 302…)
- A status text. A brief, human-readable, informational text about the status code
What is on the first line of an HTTP request message?
- HTTP method (POST, GET, PUT, HEAD, OPTIONS, etc)
- request target (URL)
- HTTP version
What is express js?
-a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications
How do you add express to your package dependencies?
npm install express in your root directory or manually edit package.json
What Express application method starts the server and binds it to a network PORT?
listen()