NODE.js

 

What is Node ?


Node is a JavaScript Runtime ,cross-platform ,open-source build on Chrome's V8 JavaScript Engine.Node.js run the V8 JavaScript engine, the core of google Chrome, outside of the browser. This allows Node.js to be  very performant .Node.js has a unique advantage because millions of fronted developers that write JavaScript for the browser are now able to write the server-side code in additional to the client-side code without the need to learn a completely different language.


Why does not alert() run inside Node?

alert() is not a part of Node it is a part of Browser type . no alert() function is there in node.js Because the function is actually a method that belong to the window object and there is no window object in node.js

 

What is Chrome v8 engine ?

The Chrome V8 engine is a high performance JavaScript engine written in C++. It is an open source project by google. It also has the flexibility to be used both on the client side and server side. Essentially V8 engine is turned for high performance


How we can see the version of Node and NPM ?

If the user want's  check the version of Node and NPM then in Terminal just need to enter    node -v it will show the version of node and for NPM in terminal  need to enter NPM -v      it shows the NPM version that -v (define for Version).


How to install Packages using NPM ?

NPM (node package manager) is a part of node. NPM can help us to install all the JavaScript packages using npm installer.so inside Terminal if  user enter npm install <package name> then the package    will be install and it create node_modules and package-lock.json inside node_modules aur package reference copy will be there and in package-lock.json it will provide  version of that packages


What is the Importance of  Node_Modules ?

Node module is a module where it has all the copy of our installer. suppose user install jquery  it will type command for jquery(npm install jquery) and that jquery will install it's refrence will be in package.json  and a copy will be there in node_modules .whatever we are installing using npm all the copy  will be inside node_module and if node-module file will deleted then simply in terminal enter npm install it will create node_module 


What is Package.json file ?

Package.json file it  has all the References of NPM what we are installing it's reference will be there  in  package.json  file. Once user created new angular application  there will be a package.json file among the newly created files and folders. package.json file located in project root and contains information about user web application. the main purpose of the file comes from its name package, so it will contain the information about npm packages installed for the project.


How to create Package.json ?

Creating a package.json file is typically the first step in a Node.js project. if user want to create package.json then in Terminal need to enter   npm init then provide name and press enter and our package.json module will create





Comments

Popular posts from this blog

STORE PROCEDURE AND FUNCTION