What is Node Js?
- Node js is a server-side platform built on google chrome's Java Script Engine.
- Node js open source, cross platform run time environment developing server side and netwerking applications.
- Node Js applications are written in javascript.
Future of node js:
- Asynchronous and Event Driven: All APIs of Node.js library are asynchronous, that is, non-blocking. It essentially means a Node.js based server never waits for an API to return data. The server moves to the next API after calling it and a notification mechanism of Events of Node.js helps the server to get a response from the previous API call.
- Very Fast: − Being built on Google Chrome's V8 JavaScript Engine, Node.js library is very fast in code execution.
- Single Threaded but Highly Scalable: − Node.js uses a single threaded model with event looping. Event mechanism helps the server to respond in a non-blocking way and makes the server highly scalable as opposed to traditional servers which create limited threads to handle requests.
- No Buffering: Node.js applications never buffer any data. These applications simply output the data in chunks
REPL Terminal:
REPL Stands for Read Eval Print Loop and it represents a computer environment like a Windows console or Unix/Linux shell where a command is entered and the system responds with an output in an interactive mode.
Read:Reads user's input, parses the input into JavaScript data-structure, and stores in memory.
Eval: - Takes and evaluates the data structure.
Print: - Prints the result.
Loop: - Loops the above command until the user presses ctrl-c twice.