mirror of
				https://github.com/goldbergyoni/nodebestpractices.git
				synced 2025-10-31 17:47:26 +08:00 
			
		
		
		
	Update readme-copy.md
This commit is contained in:
		| @ -19,13 +19,13 @@ This repository summarizes and curates most of the knowledge gathered to date on | |||||||
| # Project Setup Practices | # Project Setup Practices | ||||||
|  |  | ||||||
|  |  | ||||||
| ## :white_check_mark: 1. Do something important  | ## ☑ 1. Do something important  | ||||||
|  |  | ||||||
| **TL&DR:** Monitoring is a game of finding out issues before our customers do – obviously this should be assigned unprecedented importance. The market is overwhelmed with offers thus consider starting with defining the basic metrics you must follow (my sug | **TL&DR:** Monitoring is a game of finding out issues before our customers do – obviously this should be assigned unprecedented importance. The market is overwhelmed with offers thus consider starting with defining the basic metrics you must follow (my sug | ||||||
|  |  | ||||||
| **Otherwise:** You end-up with a blackbox that is hard to reason about, then you start re-writing all logging statements to add additional information | **Otherwise:** You end-up with a blackbox that is hard to reason about, then you start re-writing all logging statements to add additional information | ||||||
|  |  | ||||||
| ## 2. Do other thing | ## ☑ 2. Do other thing | ||||||
|  |  | ||||||
| **TL&DR:** Monitoring is a game of finding out issues before our customers do – obviously this should be assigned unprecedented importance. The market is overwhelmed with offers thus consider starting with defining the basic metrics you must follow (my sug | **TL&DR:** Monitoring is a game of finding out issues before our customers do – obviously this should be assigned unprecedented importance. The market is overwhelmed with offers thus consider starting with defining the basic metrics you must follow (my sug | ||||||
|  |  | ||||||
| @ -36,11 +36,15 @@ This repository summarizes and curates most of the knowledge gathered to date on | |||||||
|  |  | ||||||
|  |  | ||||||
| # Error Handling Practices | # Error Handling Practices | ||||||
| ## [Use async-await for async error handling](/sections/errorhandling/asyncawait.md) |  | ||||||
|  | ## ☑ Use async-await for async error handling | ||||||
|  |  | ||||||
| **TL;DR:** Handling async errors in callback style is probably the fastest way to hell (a.k.a the pyramid of doom). The best gift you can give to your code is using instead a reputable promise library or async-await which provides much compact and familiar code syntax like try-catch | **TL;DR:** Handling async errors in callback style is probably the fastest way to hell (a.k.a the pyramid of doom). The best gift you can give to your code is using instead a reputable promise library or async-await which provides much compact and familiar code syntax like try-catch | ||||||
|  |  | ||||||
| **Otherwise:** Node.JS callback style, function(err, response), is a promising way to un-maintainable code due to the mix of error handling with casual code, excessive nesting and awkward coding patterns | **Otherwise:** Node.JS callback style, function(err, response), is a promising way to un-maintainable code due to the mix of error handling with casual code, excessive nesting and awkward coding patterns | ||||||
|  |  | ||||||
|  | (Further Reading: Use async-await for async error handling)[(/sections/errorhandling/asyncawait.md)] | ||||||
|  |  | ||||||
|  |  | ||||||
| # Going To Production Practices | # Going To Production Practices | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 idori
					idori