diff --git a/Programming_Languages/NodeJS/Middlewear.md b/Programming_Languages/NodeJS/Middlewear.md index b74dc44..e44575c 100644 --- a/Programming_Languages/NodeJS/Middlewear.md +++ b/Programming_Languages/NodeJS/Middlewear.md @@ -89,5 +89,13 @@ With Morgan in place, every time we run a request it will be logged on the conso ```plain GET /api/courses 200 95 - 1.774 ms +``` +This uses the `tiny` default which logs the bare minimum giving us: request type; endpoint; response code; and time to execute. -``` \ No newline at end of file +It defaults to logging on the console but can also be configured to write to a log file. + +## Including middlewear based on environment +With a full-scale Node application you will typically run three environments: +* Development +* Testing +* Production \ No newline at end of file diff --git a/pdf/Algorithmic_complexity.pdf b/pdf/Algorithmic_complexity.pdf index e620d6d..7260c3c 100644 Binary files a/pdf/Algorithmic_complexity.pdf and b/pdf/Algorithmic_complexity.pdf differ diff --git a/pdf/Arrays.pdf b/pdf/Arrays.pdf index d75bf9c..9af869e 100644 Binary files a/pdf/Arrays.pdf and b/pdf/Arrays.pdf differ diff --git a/pdf/Assembly_programs.pdf b/pdf/Assembly_programs.pdf index 01f9b63..a129d84 100644 Binary files a/pdf/Assembly_programs.pdf and b/pdf/Assembly_programs.pdf differ diff --git a/pdf/Atomic_and_molecular_sentences.pdf b/pdf/Atomic_and_molecular_sentences.pdf index 0378854..9b5c422 100644 Binary files a/pdf/Atomic_and_molecular_sentences.pdf and b/pdf/Atomic_and_molecular_sentences.pdf differ diff --git a/pdf/Axioms_of_set_theory.pdf b/pdf/Axioms_of_set_theory.pdf index 3f34ec4..9fd780f 100644 Binary files a/pdf/Axioms_of_set_theory.pdf and b/pdf/Axioms_of_set_theory.pdf differ diff --git a/pdf/Basic_database_concepts.pdf b/pdf/Basic_database_concepts.pdf index c64ab95..c9ddc81 100644 Binary files a/pdf/Basic_database_concepts.pdf and b/pdf/Basic_database_concepts.pdf differ diff --git a/pdf/Basic_properties_of_sets.pdf b/pdf/Basic_properties_of_sets.pdf index 6730f18..8eb5317 100644 Binary files a/pdf/Basic_properties_of_sets.pdf and b/pdf/Basic_properties_of_sets.pdf differ diff --git a/pdf/Biconditional_Elimination.pdf b/pdf/Biconditional_Elimination.pdf index 655cbb9..8ac53bc 100644 Binary files a/pdf/Biconditional_Elimination.pdf and b/pdf/Biconditional_Elimination.pdf differ diff --git a/pdf/Biconditional_Introduction.pdf b/pdf/Biconditional_Introduction.pdf index 3e3459a..97ec771 100644 Binary files a/pdf/Biconditional_Introduction.pdf and b/pdf/Biconditional_Introduction.pdf differ diff --git a/pdf/Binary_arithmetic.pdf b/pdf/Binary_arithmetic.pdf index b275ee1..2864c26 100644 Binary files a/pdf/Binary_arithmetic.pdf and b/pdf/Binary_arithmetic.pdf differ diff --git a/pdf/Binary_arithmetic_with_circuits.pdf b/pdf/Binary_arithmetic_with_circuits.pdf index 2111d98..81cc54d 100644 Binary files a/pdf/Binary_arithmetic_with_circuits.pdf and b/pdf/Binary_arithmetic_with_circuits.pdf differ diff --git a/pdf/Bits,_bytes,_nibbles.pdf b/pdf/Bits,_bytes,_nibbles.pdf index 08184b3..32c8f72 100644 Binary files a/pdf/Bits,_bytes,_nibbles.pdf and b/pdf/Bits,_bytes,_nibbles.pdf differ diff --git a/pdf/Compile_from_source.pdf b/pdf/Compile_from_source.pdf index 37ef3a3..f121f43 100644 Binary files a/pdf/Compile_from_source.pdf and b/pdf/Compile_from_source.pdf differ diff --git a/pdf/Conditional_Elimination.pdf b/pdf/Conditional_Elimination.pdf index e83f1ed..8f70ca0 100644 Binary files a/pdf/Conditional_Elimination.pdf and b/pdf/Conditional_Elimination.pdf differ diff --git a/pdf/Conditional_Introduction.pdf b/pdf/Conditional_Introduction.pdf index 996602d..0deb23f 100644 Binary files a/pdf/Conditional_Introduction.pdf and b/pdf/Conditional_Introduction.pdf differ diff --git a/pdf/Conjunction_Elimination.pdf b/pdf/Conjunction_Elimination.pdf index 160da72..0d6c0b3 100644 Binary files a/pdf/Conjunction_Elimination.pdf and b/pdf/Conjunction_Elimination.pdf differ diff --git a/pdf/Conjunction_Introduction.pdf b/pdf/Conjunction_Introduction.pdf index 06f5d88..4d1641f 100644 Binary files a/pdf/Conjunction_Introduction.pdf and b/pdf/Conjunction_Introduction.pdf differ diff --git a/pdf/Defining_a_computer.pdf b/pdf/Defining_a_computer.pdf index d3b53d4..4ba1de1 100644 Binary files a/pdf/Defining_a_computer.pdf and b/pdf/Defining_a_computer.pdf differ diff --git a/pdf/Design_features_of_language.pdf b/pdf/Design_features_of_language.pdf index 652c587..51ecaf2 100644 Binary files a/pdf/Design_features_of_language.pdf and b/pdf/Design_features_of_language.pdf differ diff --git a/pdf/Disjunction_Elimination.pdf b/pdf/Disjunction_Elimination.pdf index 82e193e..4437f67 100644 Binary files a/pdf/Disjunction_Elimination.pdf and b/pdf/Disjunction_Elimination.pdf differ diff --git a/pdf/Disjunction_Introduction.pdf b/pdf/Disjunction_Introduction.pdf index 4981979..c1b5a2a 100644 Binary files a/pdf/Disjunction_Introduction.pdf and b/pdf/Disjunction_Introduction.pdf differ diff --git a/pdf/HTTP_request_types.pdf b/pdf/HTTP_request_types.pdf index d002d6b..ac9a590 100644 Binary files a/pdf/HTTP_request_types.pdf and b/pdf/HTTP_request_types.pdf differ diff --git a/pdf/Indeterminacy.pdf b/pdf/Indeterminacy.pdf index 6f7077d..0510bdc 100644 Binary files a/pdf/Indeterminacy.pdf and b/pdf/Indeterminacy.pdf differ diff --git a/pdf/Law_of_the_Excluded_Middle.pdf b/pdf/Law_of_the_Excluded_Middle.pdf index d557a3a..fe42d7b 100644 Binary files a/pdf/Law_of_the_Excluded_Middle.pdf and b/pdf/Law_of_the_Excluded_Middle.pdf differ diff --git a/pdf/Logic_circuits.pdf b/pdf/Logic_circuits.pdf index 38b7082..3df1470 100644 Binary files a/pdf/Logic_circuits.pdf and b/pdf/Logic_circuits.pdf differ diff --git a/pdf/Logic_gates.pdf b/pdf/Logic_gates.pdf index 6312260..2e00976 100644 Binary files a/pdf/Logic_gates.pdf and b/pdf/Logic_gates.pdf differ diff --git a/pdf/Logical_possibility_and_necessity.pdf b/pdf/Logical_possibility_and_necessity.pdf index 403e9f3..7ffff60 100644 Binary files a/pdf/Logical_possibility_and_necessity.pdf and b/pdf/Logical_possibility_and_necessity.pdf differ diff --git a/pdf/Lovelace_quote.pdf b/pdf/Lovelace_quote.pdf index 5c4937f..d412f0b 100644 Binary files a/pdf/Lovelace_quote.pdf and b/pdf/Lovelace_quote.pdf differ diff --git a/pdf/Morphology.pdf b/pdf/Morphology.pdf index a7bcb2c..983603c 100644 Binary files a/pdf/Morphology.pdf and b/pdf/Morphology.pdf differ diff --git a/pdf/Negation_Elimination.pdf b/pdf/Negation_Elimination.pdf index 8b30980..296f93b 100644 Binary files a/pdf/Negation_Elimination.pdf and b/pdf/Negation_Elimination.pdf differ diff --git a/pdf/Negation_Introduction.pdf b/pdf/Negation_Introduction.pdf index 2863acc..31ecf12 100644 Binary files a/pdf/Negation_Introduction.pdf and b/pdf/Negation_Introduction.pdf differ diff --git a/pdf/Object_language_and_meta-language.pdf b/pdf/Object_language_and_meta-language.pdf index 756f807..477d436 100644 Binary files a/pdf/Object_language_and_meta-language.pdf and b/pdf/Object_language_and_meta-language.pdf differ diff --git a/pdf/Package_management_in_Arch.pdf b/pdf/Package_management_in_Arch.pdf index 9780a68..2c93f86 100644 Binary files a/pdf/Package_management_in_Arch.pdf and b/pdf/Package_management_in_Arch.pdf differ diff --git a/pdf/Primary_key.pdf b/pdf/Primary_key.pdf index eb94b0b..ac0723c 100644 Binary files a/pdf/Primary_key.pdf and b/pdf/Primary_key.pdf differ diff --git a/pdf/Queue.pdf b/pdf/Queue.pdf index c291294..84a7ded 100644 Binary files a/pdf/Queue.pdf and b/pdf/Queue.pdf differ diff --git a/pdf/RESTful_APIs.pdf b/pdf/RESTful_APIs.pdf index 748f98c..c7d4928 100644 Binary files a/pdf/RESTful_APIs.pdf and b/pdf/RESTful_APIs.pdf differ diff --git a/pdf/Recursion.pdf b/pdf/Recursion.pdf index ac5f07c..d67e4ea 100644 Binary files a/pdf/Recursion.pdf and b/pdf/Recursion.pdf differ diff --git a/pdf/Reiteration.pdf b/pdf/Reiteration.pdf index 4f38913..533574d 100644 Binary files a/pdf/Reiteration.pdf and b/pdf/Reiteration.pdf differ diff --git a/pdf/SQL_syntax.pdf b/pdf/SQL_syntax.pdf index 771a27a..a5e5e39 100644 Binary files a/pdf/SQL_syntax.pdf and b/pdf/SQL_syntax.pdf differ diff --git a/pdf/Semantic_versioning.pdf b/pdf/Semantic_versioning.pdf index 3b1b085..320cb82 100644 Binary files a/pdf/Semantic_versioning.pdf and b/pdf/Semantic_versioning.pdf differ diff --git a/pdf/Soundness.pdf b/pdf/Soundness.pdf index cd21a14..1429140 100644 Binary files a/pdf/Soundness.pdf and b/pdf/Soundness.pdf differ diff --git a/pdf/Stacks.pdf b/pdf/Stacks.pdf index e3fde78..97aeb57 100644 Binary files a/pdf/Stacks.pdf and b/pdf/Stacks.pdf differ diff --git a/pdf/Syllogism.pdf b/pdf/Syllogism.pdf index a36dfbd..ced35d7 100644 Binary files a/pdf/Syllogism.pdf and b/pdf/Syllogism.pdf differ diff --git a/pdf/The_Pragmatic_Programmer_1999.pdf b/pdf/The_Pragmatic_Programmer_1999.pdf index 21274ff..ac6b5b0 100644 Binary files a/pdf/The_Pragmatic_Programmer_1999.pdf and b/pdf/The_Pragmatic_Programmer_1999.pdf differ diff --git a/pdf/The_binary_number_system.pdf b/pdf/The_binary_number_system.pdf index 0af9345..ec36422 100644 Binary files a/pdf/The_binary_number_system.pdf and b/pdf/The_binary_number_system.pdf differ diff --git a/pdf/Theorems_and_empty_sets.pdf b/pdf/Theorems_and_empty_sets.pdf index 926bcaf..7fa72ea 100644 Binary files a/pdf/Theorems_and_empty_sets.pdf and b/pdf/Theorems_and_empty_sets.pdf differ diff --git a/pdf/Turing_machines.pdf b/pdf/Turing_machines.pdf index 2332cf7..866b202 100644 Binary files a/pdf/Turing_machines.pdf and b/pdf/Turing_machines.pdf differ diff --git a/pdf/User_management.pdf b/pdf/User_management.pdf index 3c89620..97cb0f9 100644 Binary files a/pdf/User_management.pdf and b/pdf/User_management.pdf differ diff --git a/pdf/Von_Neumann_architecture.pdf b/pdf/Von_Neumann_architecture.pdf index 20c71b6..4ff0567 100644 Binary files a/pdf/Von_Neumann_architecture.pdf and b/pdf/Von_Neumann_architecture.pdf differ diff --git a/pdf/Why_computers_use_binary.pdf b/pdf/Why_computers_use_binary.pdf index acccab4..d2b1c3f 100644 Binary files a/pdf/Why_computers_use_binary.pdf and b/pdf/Why_computers_use_binary.pdf differ