Basics Of Node js
Node is an open-source platform that compiles the program on the server side. Node is useful for developing applications that require a persistent connection from the browser.
It is often used to real-time or stream event applications like chat, news, and some wen notifications. Node js application is event-based and it is run asynchronously. It does not follow the traditional model like process, send wait, and receive. It sends a request in constant stag in an event module and continuously .it is responded to one after the other without a waiting period.
This is a shift away from more complex processes, mainstream models that run larger run several threads concurrently, and each thread gives us an appropriate response before it will be moving on. SevenMentor is a Leading IT institute offering Full Stack Training in Pune
Synchronization between client and server has the same code base. Node js never waits for the from an API. It is without waiting for the data from API, it will be directly moved to the next API. It is single threaded architecture which means with the help of event looping, single
Threaded architecture and for this architecture makes Node js more scalable. Single-threaded program is followed by NodeJS and it allows NodeJs to process huge amounts of requests. The cluster module is used by Node js for managing the load balancing for all active CPU cores.
of NodeJs is that it can partition the applications horizontally and this partitioning procedure is mainly achieved by it due to the use of child processes. Distinct app versions are provided to different target audiences and also allow them for catering to the client’s preferences.
Modules are a set of function which provides inbuilt functionality. Use the require() function with that parenthesis we have to name a module.
HTTP modules create s server with the help of classes, methods, events, etc.
It includes utility functions and it is useful for developers. Fs module means filesystem module it includes classes and events methods to deal with file system I/O operation. URL methods to include URL with parsing. Query string to fire the query string.
The stream includes handling streaming data. Zlib includes handling data with metadata.
Cluster is providing multi-threading by creating child processes that share the same server port and it’s run simultaneously. Node Js is built on a single-threaded process.
Global objects are available in all NodeJS. Examples are _dirname, _filename, exports module, and require.
Errors in Node.js are handled through exceptions.
Streaming is the object that data is read or written continuously. In NodeJS four types of stram are available
Parts of NodeJS:
SevenMentor Pvt Ltd
Call the Trainer and Book your free demo Class for now!!!
© Copyright 202! | Sevenmentor Pvt Ltd.