What is Chunk in Node.js ?
In Node.js, the term “chunk” refers to a small, manageable piece of data that is part of a larger dataset. Node.js processes data in chunks, especially when dealing with streams, which makes handling large files or data sources more efficient and memory-friendly. This article explores what chunks are, how they work, and their significance in Node.js....
read more
How to create pagination in Node.js using skip and limit ?
Nodejs is an open-source and cross-platform runtime environment for executing JavaScript code outside the browser. It is widely used in developing APIs and microservices from small to large companies. It is a great tool as this enables developers to use JavaScript both on the server and client sides....
read more
How to access cache data in Node.js ?
Cache: Caching is a technique used for improving the performance of servers and a lot of devices used in day-to-day life.In caching, the result of certain computation or task is stored somewhere, and if the same computation is required again, it is served from that location itself rather than doing the computation again. This reduces computation and improves performance, thereby providing a better user experience.A lot of apps cache data for the first time they’re fired, hence are able to efficiently provide responses. Similarly, the majority of servers have advanced cached mechanisms for endpoints that serve the same response for the majority of the time....
read more
Node.js path.parse() Method
The path.parse() method is used to return an object whose properties represent the given path. This method returns the following properties:...
read more
How to call an API continuously from server side itself in Node.js/Express.js ?
Calling an API endpoint is the core functionality of modern internet technology. Usually, we call API from the browser. Sometimes we need to call API endpoint from the server itself to fetch data, load dependencies, etc....
read more
Node.js process.exit() Method
The process.exit() method is used to end the process which is running at the same time with an exit code in NodeJS....
read more
Node.js lodash.sortBy() Function
Lodash is a module in Node.js that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc. The Loadsh.sortBy() function is used to sort the array in ascending order....
read more
Node.js assert() Function
The assert module provides a set of assertion functions for verifying invariants. In assert() function, if the value is not truth, then a AssertionError is thrown with a message property set equal to the value of the message parameter....
read more
Node.js socket.connect() Method
The socket.connect() method is an inbuilt application programming interface of class Socket within dgram module which is used to connect the particular server to a particular port and address....
read more
Node.js Assert Complete Reference
Assert module in Node.js provides a bunch of facilities that are useful for the assertion of the function. The assert module provides a set of assertion functions for verifying invariants. If the condition is true it will output nothing else an assertion error is given by the console....
read more
Node.js new Error() Method
For generating and handling errors, Node.js supports so many mechanisms that occur during the running application and it is an inbuilt application, so we don’t import any libraries. All the system errors that are raised by Node.js are inherited from the JavaScript’s <Error> class and provide the least properties available in that class....
read more
Node.js HTTP Module Complete Reference
To make HTTP requests in Node.js, there is a built-in module HTTP in Node.js to transfer data over the HTTP. To use the HTTP server in the node, we need to require the HTTP module. The HTTP module creates an HTTP server that listens to server ports and gives a response back to the client....
read more