Category: Node js

  • NestJS

    Welcome to the tutorial of NestJS. This tutorial is solely intended to make you gain absolute knowledge of NestJS. You would be learning about it from a beginner level covering all the tiny staircases that will push you into installation, creating a new application from NestJS from scratch, and learn how to handle and implement in…

  • Node.js Web Module

    What is Web Server Web Server is a software program that handles HTTTP requests sent by HTTP clients like web browsers, and returns web pages in response to the clients. Web servers usually respond with html documents along with images, style sheets and scripts. Most of the web server support server side scripts using scripting…

  • Node.js Events

    In Node.js applications, Events and Callbacks concepts are used to provide concurrency. As Node.js applications are single threaded and every API of Node js are asynchronous. So it uses async function to maintain the concurrency. Node uses observer pattern. Node thread keeps an event loop and after the completion of any task, it fires the…

  • Node.js Callbacks

    Callback is an asynchronous equivalent for a function. It is called at the completion of each task. In Node.js, callbacks are generally used. All APIs of Node are written in a way to supports callbacks. For example: when a function start reading file, it returns the control to execution environment immediately so that the next…

  • Node.js V8

    What is V8 V8 is an open source JavaScript engine developed by the Chromium project for the Google Chrome web browser. It is written in C++. Now a days, it is used in many projects such as Couchbase, MongoDB and Node.js. V8 in Node.js The Node.js V8 module represents interfaces and event specific to the…

  • Node.js Assertion Testing

    The Node.js Assert is the most elementary way to write tests. It provides no feedback when running your test unless one fails. The assert module provides a simple set of assertion tests that can be used to test invariants. The module is intended for internal use by Node.js, but can be used in application code…

  • Node.js ZLIB

    The Node.js Zlib module is used to provide compression and decompression (zip and unzip) functionalities. It is implemented using Gzip and deflate/inflate. The zlib module can be accessed using: Compressing and decompressing a file can be done by piping the source stream data into a destination stream through zlib stream. Node.js ZLIB Example: Compress File…

  • Node.js Path

    The Node.js path module is used to handle and transform files paths. This module can be imported by using the following syntax: Syntax: Node.js Path Methods Let’s see the list of methods used in path module: Index Method Description 1. path.normalize(p) It is used to normalize a string path, taking care of ‘..’ and ‘.’…

  • Node.js File System (FS)

    In Node.js, file I/O is provided by simple wrappers around standard POSIX functions. Node File System (fs) module can be imported using following syntax: Syntax: Node.js FS Reading File Every method in fs module has synchronous and asynchronous forms. Asynchronous methods take a last parameter as completion function callback. Asynchronous method is preferred over synchronous…

  • Node.js Streams

    Streams are the objects that facilitate you to read data from a source and write data to a destination. There are four types of streams in Node.js: Each type of stream is an Event emitter instance and throws several events at different times. Following are some commonly used events: Node.js Reading from stream Create a…