Home » NodeJs

Passport.js Authentication

What is middleware Authentication and why it is important? Middleware Authentication is the technique used to ensure that the managing server and data collectors communicate with each other in a secure manner. lets give a simple example: suppose…

Read More »

Promises and Error Handling

What is promise? Promise provide us an alternative approach of asynchronous operation which is clean, more readable and flexible when compared to traditional callback-based approaches. It is very useful when we chain multiple async operation and after that we do…

Read More »

Temporal dead zone (TDZ) and the Deathly Hallows

What is TDZ in javascript? Temporal dead zone is the period between entering scope and being declared where they cannot be accessed. An example will give it clear the concept of TDZ. So, for example- accessDenied = ‘can not…

Read More »

Circular dependencies in Node.js

What is cyclic/ circulardependencies in nodeJs When required a module and we got {} instead. Suppose, we have the following code // moduleA.js var ModuleB = require(‘./moduleB.js’); var ModuleA = function() { this.bInstance = ModuleB(); this.property = 10;…

Read More »