Bus-boy
Why in busboy I am making use of stream for uploading files An example of file upload with busboy and express// accept POST request on the homepage app.post('/', function (req, res) { ...
Why in busboy I am making use of stream for uploading files An example of file upload with busboy and express// accept POST request on the homepage app.post('/', function (req, res) { ...
Prior to the introduction of TypedArray, the JavaScript language had no mechanism for reading or manipulating streams of binary data. The Buffer class was introduced as part of the Node.js API to ...
A> To handle HTTP POST request in Express.js version 4 and above, you need to install middleware module called body-parser. body-parser extract the entire body portion of an incoming request ...
Hash algorithms are one way functions. They turn any amount of data into a fixed-length "fingerprint" that cannot be reversed. They also have the property that if the input changes by even a tiny ...
1. app.use() takes only one callback whereas app.all() can take multiple callbacks. 2. ## app.use() only see whether url starts with specified path where app.all() will match complete path. Here is ...
Middleware refers to reusable components that can be plugged into an Express application. Middleware consists of functions that handle HTTP requests, such as the one we would pass to Node's native ...
Streams are collections of data — just like arrays or strings. The difference is that streams might not be available all at once, and they don’t have to fit in memory. This makes streams really ...
These constraints, applied to the architecture, were originally communicated by Roy Fielding in his doctoral dissertation (see https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm) ...
Node is completely event-driven. Basically the server consists of one thread processing one event after another. A new request coming in is one kind of event. The server starts processing it and ...
Sharding is a concept in MongoDB, which splits large data sets into small data sets across multiple MongoDB instances. Sometimes the data within MongoDB will be so huge, that queries against such ...
In this next example, I am going to create two new schemas that will demonstrate how to create a relationship to another schema: author and book. The book schema will contain a reference to the ...
populate() is a way to populate referenced subdocuments in any schema. Lets take an example of a social network, one collection for users, and one for posts. In my research before doing any coding, ...
An index in MongoDB is a special data structure that holds the data of few fields of documents on which the index is created. Indexes improve the speed of search operations in database because ...
Applications that rely on third-party sources for data will at some point need to include things like OAuth tokens, SSH keys, or API credentials. This becomes an issue when the code for the ...
Aggregation in MongoDB is nothing but an operation used to process the data that returns the computed results. Aggregation basically groups the data from multiple documents and operates in many ways ...
The Collection is group of Documents in MongoDB. In RDBMS, this can be considered as a table which will have list records (documents in MongoDB).What is a Document?The Document is a set ...
Mongodb provides us with a very efficient way to store files directly in db rather than in file system. So basically what this means is, suppose you need to store an image file or an audio or video ...
When a user clicks a button or presses a key, an event is fired. These are called a click event or a keypress event, respectively. An event handler is a JavaScript function that runs when an event ...
Hello and welcome to the world of little known optimization techniques. Reflow and repaint are important concepts that most developers are not exposed to. Put simply, browser reflow is simply the ...
An Execution Context is created each time you run your .js file/app. The first step in this creation phase is Hoisting. The JS Engine reserves space or set's up memory for all the variables and ...