Writing code in CommonJS standard
Created by Codedamn about a year ago
No description provided
nternal/modules/cjs/loader.js:883 throw err; ^
im getting this error, while trying to run in my local machine
Can you please explain the usage of the colon (;) before the async function? It does not work without it.
Basically Nodejs is single threaded. we cant use synchronous file read write operations because, if we have large file content to be written or to be read, then it would block our code. this is known as blocking code. async is called as non blocking because - all this file io operations are done by thead pool. and we dont have to wait for the code to get finished
Async http -Node can work on other things while OS waits for the network requests. Sync http Node and OS both are waiting for the request.