Implementing OAuth 2.0 with Node.js

OAuth2 is an authentication protocol that is used to authenticate and authorize users in an application by using another service provider. This post will go through how to build a Node.js application to implement the OAuth2 protocol. If you just want to see the code, you can view it here How OAuth2 Works Let’s take a brief look at the OAuth protocol before we jump into implementation. If you’ve ever seen a dialog like this, then you’ve probably used OAuth before:...

Last Updated:   · Soham Kamani

How express.js works - Understanding the internals of the express library ⚙️

If you’ve worked on web application development in node, it’s likely you’ve heard of express.js. Express is one of the most popular lightweight web application frameworks for node. In this post, we will go through the source code of express, and try to understand how it works under the hood. Studying how a popular open source library works, will help us make better applications using it, and reduces some of the “magic” involved when using it....

 · Soham Kamani

Using Nightwatch.Js To Test And Take Screenshots Of Your App

End to end testing is an often overlooked area of front-end web development. Yet, it is quintessential to making sure your application works the way it should. In this post, we will go through how to seamlessly set up and execute E2E tests using an awesome library called nightwatch.js, and in the process, automate screen capturing your application with each test run. Initial Setup Make a new project folder, and initialize your package....

 · Soham Kamani

Adding a Redis Cache To Your Node.js Server

NodeJs is known for its speed with respect to async tasks, but there’s still a lot of potential to make responses from your server even faster, sometimes by orders of magnitude. In this post, we are going to go through a brief introduction to the concept of caching, along with a tutorial on how to implement it using redis and an express server. What Is Caching? Normally, when you make a web server with a database, each request to the server entails one or more requests to the database, and some processing of the results before sending back a response....

 · Soham Kamani

Making (and deploying) an Interactive Telegram Bot in Node.js

This tutorial will go through a straightforward set of steps to get a responsive telegram bot up and running from scratch I spent a considerable amount of time figuring out how to make a functional telegram bot. I mean sure, the official introduction is good, but theres a lot of stuff about what bots are, and a few scattered instructions about the API, but not enough of structure for a beginner to get up and running quickly....

Last Updated:   · Soham Kamani

How to communicate between Python and NodeJs 🐍

NodeJs is amazing at a lot of things, but one area where it falls short is numerical and scientific computation. Python, on the other hand, is great for stuff like that, and libraries like numpy and scipy make scientific computing a breeze. Fortunately, we can utilize the power of numpy within our node application, by calling a python process to run in the background, do all the dirty work and give back the result....

 · Soham Kamani