Monday, 28 February 2022

Nodejs Notes for Beginner

What is NodeJS ?

Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on the V8 engine and executes JavaScript code outside a web browser.

What is NPM in NodeJS?
npm is the default package manager for the JavaScript runtime environment Node.js. It consists of a command line client, also called npm, and an online database of public and paid-for private packages, called the npm registry. 

Some Important Commands for NPM: 

  1. npm init - initialize the npm in project (you will get package.json file  );
  2. npm install package name (npm install cli-color) - you will get cli-color module 
  3. npm install - (after delete module folder ) Install all package (module folder)























what is IIFE function in JavaScript?














and in NPM module like this IIFE Function Decleare :-









How to export NPM module in our project file ? :-















How to export local module in our project? :-
















Export Two or more function from same local module :-





























Next :- Notes in NodeJS Core Module 



No comments:

Post a Comment

HTTP module in NodeJS(Core module of NodeJS)

 What is HTTP module in Nodejs? To make HTTP requests in Node.js, there is a built-in module  HTTP  in Node.js to transfer data over the HTT...