Skip to main content

Posts

Showing posts with the label Node js Training in Chennai

Process Object in Node JS

             Node JS offers several Inbuilt core objects. Here we gonna discuss about one of the important Core Object - Process . The process object is a global object and can be accessed from anywhere. Here I have listed out few Methods and properties of an Object. Process Events Event: 'exit' Emitted when the process is about to exit. There is no way to prevent the exiting of the event loop at this point, and once all exit listeners have finished running the process will exit. Therefore you must only perform synchronous operations in this handler. process.on( 'exit' , function (code) { // Sync function only      console .log( 'About to exit with code:' , code); }); Event: 'beforeExit' This event is emitted when node empties it's event loop and has nothing else to schedule. Normally, node exits when there is no work scheduled, but a listener for 'beforeExit' can make asynchronous calls, and cause no...

Node JS Introduction

Node js Introduction: 1.      Node.js is a server-side platform built on Google Chrome's JavaScript Engine (V8 Engine). 2.      cross-platform runtime environment used for development of server-side web applications. 3.      Node.js applications are written in JavaScript and can be run on a wide variety of operating systems. 4.      Node.js is based on an event-driven. 5.      Non-blocking Input/Output. 6.      Node.js also thousands of JavaScript modules which simplifies the development of web applications called as NPM. 7.      Single thread process. Reasons to choose Node js? 1.      Node uses the V8 JavaScript Runtime engine , the one which is used by Google Chrome. 2.      Asynchronous event driven IO helps concurrent request handling .This feature basically means that if ...