Learn free node tutorials

How to check internet connection status in NodeJs with example

February 10, 2022 ·  1 min read

Nodejs Is a javascript environment for Running applications on Desktop and IoT devices. Sometimes, We need to check internet connection is available in IoT Rasberry PI devices. There are multiple ways we can check internet network connection in Nodejs. How to detect the Internet connection is offline in Nodejs? NodeJS has an inbuilt dns module for the domain name system(DNS) for IP address lookup and name resolution. It provides lookup() function to check name resolution....

Quick way to delete node_modules folder on Windows

January 22, 2022 ·  2 min read

Sometimes, We want to delete the node_modules folder in windows for a fresh installation of packages. node_modules contains a nested recursive folder, and the files count is very huge. Delete a node_module folder in windows is not the quickest and is time-consuming because of the following reasons. Due to this, In Windows, The node_modules files are deleted in two phases. Discovery phase: In this, It calculates the number of files and folder size before deleting the folders and files....

chalkjs command linting output styling

January 1, 2022 ·  2 min read

chalk is a JavaScript library for styling the console output strings in a terminal. We can style using foreground and background colors, Underline, Bold and RGB colors. It is a popular library used in Nodejs to apply syntax colors to features Opensource npm library provided All colors are supported Server-side support, not a browser-based library Let’s first create a node application called chalkjsdemo. First create a chalkjsdemo directory...

How to read command line arguments in Nodejs application?

January 1, 2022 ·  2 min read

This post covers an example of how to read command-line arguments from a nodejs application. In Nodejs, There are many ways we can read command line parameters from a terminal. parse with process.argv variable minimist library yargs npm library How to read command line arguments using process argv variable the process is an environment variable to hold nodejs environment information. argv parameter stores command line information and return an array of command-line arguments....

How to reduce Image width and height in Nodejs| image-size npm library

January 1, 2022 ·  2 min read

In my previous tutorials, Discussed how to get image width and height in JavaScript Image size width and height in javascript In this tutorial, we are going to discuss how to get Image size in the Nodejs application. In Nodejs, We have different ways we can get image size using npm libraries and Inbuilt API’s This tutorial talks about image-size npm library with example. This library supports all images of different types - PNG, BMP, ICO, SVG, and JPEG...

You'll get a notification every time a post gets published here.