41. Explain “Path” module in Node.JS?
“Path” module will be used for transforming and handling file paths. Below is the syntax of path module –
var mypath = require(“path”)
42.What are the advantages of NodeJS?
Below are the list of advantages of NodeJS –
- Community Driven – NodeJS has great open source community which has developed many excellent modules for NodeJS to add additional capabilities to NodeJS applications.
Stub is a small program, which substitutes for a longer program, possibly to be loaded later and that is located remotely. Stubs are functions/programs that simulate the behaviors of components/modules.
44.How we can convert Buffer to JSON?
The syntax to convert Buffer to JSON is as shown beow
45.Explain “Net” module in Node.JS?
“Net” module is being used for creating both clients and servers. It will provide asynchronous network wrapper. Below is the syntax of Net module –
var mynet = require(“net”)
46.List out the differences between AngularJS and NodeJS?
47.How to concatenate buffers in NodeJS?
The syntax to concatenate buffers in NodeJS is
var MyConctBuffer = Buffer.concat([myBuffer1, myBuffer2]);
48.Why to use “ClearTimeout” in Node.JS?
This is the global function and it is used to stop a timer which was created during “settimeout()”.
49.Explain “NewListener” in Node.JS?
This event is being emitted whenever any listener is added. So when event is triggered the listener may not have been removed from listener array for the event.
50.Explain RESTful Web Service?
Web services which uses REST architecture will be known as RESTful Web Services. These web services uses HTTP protocol and HTTP methods.