Getting started with Node.js: A beginners guide
<p><strong>JavaScript</strong> is a programming language used primarily by Web browsers to create a dynamic and interactive experience for the user. Most of the functions and applications that make the Internet indispensable to modern life are coded in some form of JavaScript.</p>
<p>Although, JavaScript is interpreted language and doesn’t need to compile, but it was only able to run inside the browser only. Browsers have built in JavaScript engine like chrome have V8 engine and Microsoft explorer have Chakra, which compiles the code to native machine code before executing it to improve performance.</p>
<p>To run JavaScript out of the browser, <strong>Node.js</strong> was first written by <strong>Ryan Dahl</strong> in <strong>2009</strong>. Nodejs uses the V8 engine of the chrome browser to run the JavaScript. It provides a runtime environment for JS programs to run without running them on the browser.</p>
<p><strong>What is Node.js?</strong></p>
<p><strong>Node.js</strong> is an asynchronous event-driven JavaScript runtime environment (Not a framework). It enables us to run JavaScript out of the browser. Node.js consist of V8 engine, which helps to run JavaScript in a runtime environment. It uses the asynchronous mode of operation, event-driven Input/Output rather than using the traditional threads or separate threads for each process.</p>
<p><strong>Features of Node.js</strong></p>
<ol>
<li><strong>Asynchronous and Event Driven</strong> − 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.</li>
<li><strong>Very Fast</strong> − Being built on Google Chrome’s V8 JavaScript Engine, Node.js library is very fast in code execution.</li>
<li><strong>Single Threaded but Highly Scalable</strong> − 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. Node.js uses a single threaded program and the same program can provide service to a much larger number of requests than traditional servers like Apache HTTP Server.</li>
<li><strong>No Buffering</strong> − Node.js applications never buffer any data. These applications simply output the data in chunks</li>
<li><strong>Cross-platform compatibility</strong> − NodeJS may be used on a variety of systems, including Windows, Unix, Linux, Mac OS X, and mobile devices. It can be paired with the appropriate package to generate a self-sufficient executable.</li>
</ol>
<p><a href="https://medium.com/@gillamrit29/getting-started-with-node-js-a-beginners-guide-2845679a487e">Visit Now</a> </p>