Category: NodeJS

All NodeJS

Elasticsearch and NodeJS Tutorial

Elasticsearch is a RESTful search and analytics database. I have worked with Elasticsearch in more than one projects but every time I do I end up looking for the same things online. The documentation is not very well organized and it’s difficult to quickly find the things needed. Hence I have decided to come up […]

user 
All ExpressJS NodeJS

Token based authentication in Node.js using JWT

Authentication is a big part of any application. The way authentication is handled traditionally is by creating a user session on the server where we usually store the user’s information in memory or on disk. This is also known as server/session based authentication. Web applications have come a long way in a past few year, […]

user 
All Javascript NodeJS

Avoiding callback hell in Node.js

Callback hell is a phenomenon that afflicts a JavaScript developer when he tries to execute multiple asynchronous operations one after the other. Some people call it to be the pyramid of doom. Let’s have a look at an example of what we call callback hell. doSomething(param1, param2, function(err, paramx){     doMore(paramx, function(err, result){   […]

user 
All ExpressJS NodeJS

Intercept response body in NodeJS express app

Intercept response body or transform response body in express which, ever way you call it, one thing is for sure its not as straight forward as it is for the request body object. In this tutorial we will write an express middleware to intercept the response body object of an API request. You may have written […]

user 
All NodeJS Security

Salt Hash passwords using NodeJS crypto

This article will explain you to salt hash passwords using Node.js Crypto. Here we’ll not go into details comparing the pros and cons of different ways of storing passwords, rather we’ll see how we can implement salt hashing mechanism for storing passwords in NodeJS. Stay rest assured that this is one of the better ways […]

user