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 is 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 to 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 does not allow otherwise, we naturally tend to favor the use of headless browsers such as phantomjs or casperjs. [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, Node, and Express app. For simplicity, let us 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 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 have explained NoSQL data modeling and that there are three ways to model one to many relationships. In this post, I will 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]

NoSQL Example of Separate Collections in One-to-One Relationship; Case of Specialization and Generalization

When and Why Should Reference Be Used to Link Documents in 1-1 Relation.

In my detailed post on NoSQL data modeling, I listed down ways of modeling NoSQL data (using mongodb collections). For one-to-one relation, usually, it is not apparent why one needs a separate collection instead of embedding everything in single document.

[Read More]
When you purchase through links on techighness.com, I may earn an affiliate commission.