Build Queue For Processing Webhooks With Node Js And MongoDB

Manage The Flood Of Webhooks With A Database Queue

Many of the third party services we integrate in our applications use webhooks to communicate events to us. Responding to the incoming webhook with success response (status 200) is all that’s required to acknowledge the receipt of the webhook. To process that webhook immediately upon receiving or entering it in a queue to be processed later is up to you. [Read More]

Intercept Node Js Console Log And Insert In Mongodb

Easily Manageable And Searchable Application Logs Stored In Database

Your node js application is running on production, leaving hard-to-search ever-increasing log files in its wake. You want all your logs in a centralized, easily searchable place. For that, you have two options: 1 - Buy a subscription of some cloud log management service, such as papertrail. [Read More]

Scrape Website Data Without Headless Browser, Using Node Js

Not Every Website Scraping Needs Headless Browsers; Request And Cheerio Js Do Just Fine

During the course of web development, we occasionally need to scrape a website. Not just one page but many. On such requirement, mostly because the host site doesn’t allow otherwise, we naturally tend to favor the use of headless browsers such as phantomjs/casperjs. [Read More]

Confirm If A Chargebee Customer Has Already Purchased An AddOn

A workaround to overcome Chargebee's less-than-ideal querying options and non-existing email uniqueness constraint

This post contains affiliate links at no cost to you. I got to work with Chargebee integration recently, and my overall experience was good. However, I felt two obvious things were missing. First, email is not unique in Chargebee. [Read More]

Export Mongodb Collection Data In CSV From Node Express Mongoose Application

Suppose a student collection in mongodb have some data that we want to export in a csv file from a Mongoose and Node/Express app. For simplicity, let’s assume only two fields in Mongoose schema: lastName and firstName. To export a CSV file, install moment, json2csv, and mongo-date-query (optional) npm packages: [Read More]

Integrate Polling Based API In Node/Express Js

At times we need to integrate in our Node/Express application third party APIs that have implemented polling mechanism i.e. they only send back results once available; the client must keep on attempting until the service has put together all the results to return. [Read More]

Nosql Many-to-Many Relationship Examples; Bound And Unbound Cases

Right Approach To Modeling Many To Many Relations And Use Of Associative Collection

In NoSql data modeling I analyzed NoSql data modeling and ways to model many to many relationships. In another post I added a few examples of 1-to-many bound and unbound cases. Presently, I’ll illustrate bound and unbound cases for many-to-many. [Read More]

NoSql One-to-Many Relation Examples; Bound And Unbound Cases

What Are The Options To Properly Model 1-to-Many Scenarios And Which One Is Right?

In NoSql data modeling post I’ve explained NoSql data modeling and that there are three ways to model one to many relationships. In this post I’ll list real-world examples of one to many relationship — both bound and unbound — in which application of different ways of modeling are possible (or not). [Read More]