Learn free node tutorials

chalkjs command lining output styling

March 31, 2021 ·  2 min read

chalkjs 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 This is a popular library used in Nodejs to apply syntax colors to features Opensource npm library provided All colours are supported Server side support, not browser based library install npm library Let’s first create a node application called chalkjsdemo First create a chalkjsdemo directory...

How to read command line arguments in Nodejs application?

March 30, 2021 ·  2 min read

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