learn-nodejs

First-class function and function expression:

Module (require(...), module.exports = ...)

Object as collection of Name/value pairs.

Prototypal Inheritance.

(4-06)By Reference and Value.

(4-07)Immediately Invoked Function Expression(IIFE)

(4-11) Module patterns -> the most popular Revealing module pattern.

(6-1) Javascript is synchronous - only one line of code executing at a time. NodeJS is asynchronous

Binary data -> 0 1 0 1 = (2^3 * 0) +(2^2 * 1) + (2^1 * 0) + (2^0 * 1) = 0 + 4 + 0 + 1 = 5

Characters sets : a representation of a characters as numbers (Unicode, ascii)

Characters encoding : how the characters are storing in binary.

Pipe: connecting two streams by writing to one stream what is being read from another.

Protocol: a set of rules two side agree on to use when communicating.

TCP/IP - the HTTP, FTP and other protocols define structure of a sending data, the TCP defines how the data will be send.

Use streams whatever you can.

Semantic Versioning: (semver.org) version number structure -> major.minor.patch (1.7.3):

  • patch number increment if some bugs were fixed, code will work fine
  • minor number was updated if some new features were added, code will work fine.
  • major changed Big changes, code will break(maybe)

use npm init to create package.json file

use npm install <package_name> --save-dev to install development dependencies.

use npm update to update dependencies.

use npm install nodemon -g to watch changes

middleware: code that sits between two layers of software(in express between request and response).

static files: not processed by code in any way, for example: CSS, HTML...