Thursday, 20 December 2018

Node JS tutorial for beginner

NodeJS Framework Understanding

Question: What is NodeJS
Node.js is a platform built for fast and scalable network applications. It uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. It can be used in Websites application, Android applicationa and IOS application etc.


Question: What type of framework is Nodejs?
NodeJS is JavaScript-based framework/platform



Question: Is Nodejs Server OR Cient Side?
Both, Node work for both.



Question: What is REPL?
REPL stands for Read Eval Print Loop
Node.js comes with virtual environment called REPL (also Node shell).


Question: What are most common REPL Commands?
ctrl + c
Terminate the current command.
ctrl + c twice 
terminate the Node REPL.
Up/Down Keys
see command history.
tab Keys
list of current commands.
.help
list of all commands.
.break
exit from multiline expression.
.save filename 
save the current Node REPL session to a file.
.load filename
load file content in current Node REPL session.



Question: How to exist from REPL?
ctrl + c twice 



Question: How to install module in NodeJS?
npm install express
for install express.


Question: How to uninstall module in NodeJS?
npm uninstall express
for uninstall express.