Topic 3 Flashcards
What are some actions we can perform with the file_system module?
- Create directories and files
- View directories and files
- Stream files
- Read and write files
- etc.
What does it mean when a method is synchronous?
The method stops all other operations until this one is finished.
What does it mean when a method is asynchronous?
Other operations/processes can execute while this one completes itself. When complete, a callback function will be called.
How to read and write files?
fs.readFile(path, callback(err, data)) and fs.writeFile(etc)
How to read a directory?
fs.readdir(path, callback(err, files))
What is the general purpose of the URL module?
To parse URls
What is the general form of an URL?
Protocol://Domain-name:port/Directory-path/Filename
With the URL module we can access information like the…
host, protocol, authentication details, query strings, etc
The URL has two main constructors. They are
The URL class, which allows us to access the data of a URL and…
The URLSearchParams.set/get which allows us to manipulate the query string
What is HTTP?
A generic, stateless, protocol which can be used for many tasks beyond its use for hypertext, such as name servers and distributed object management systems, through extension of its requests methods ,error codes, and headers.
What are the different versions of HTML and when were they introduced and with what features?
1991 v0.9 - process static pages
1992 v0.1 - CSS, video/script/img processing
1994 v1.1 - keep-alive + cookies
2012 v2.0 - collaboration + social media
________ ___ _____ are created using server side scripts.
Dynamic web pages. The scripts processes data that comes from user input and databases.
The protocol of a URL defines…
the type of protocol used by client and server ex. http, https, ftp
The domain name of a URL defines…
the web server
The port of a URL defines…
the port used (default 80)